Fix managed users no username

This commit is contained in:
JonnyWong16 2022-04-11 15:10:53 -07:00
parent dd389b0f94
commit a9860fe62a
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -88,6 +88,10 @@ def refresh_users():
if item['title'] == item['username']:
item['title'] = None
# Check if username is blank (Managed Users)
if not item['username']:
item['username'] = item['title']
monitor_db.upsert('users', key_dict=keys_dict, value_dict=item)
query = 'UPDATE users SET is_active = 0 WHERE user_id NOT IN ({})'.format(', '.join(['?'] * len(user_ids)))