Fix library stuck as inactive in the database
This commit is contained in:
@@ -61,6 +61,7 @@ def refresh_libraries():
|
||||
'count': section['count'],
|
||||
'parent_count': section.get('parent_count', None),
|
||||
'child_count': section.get('child_count', None),
|
||||
'is_active': section['is_active']
|
||||
}
|
||||
|
||||
result = monitor_db.upsert('library_sections', key_dict=section_keys, value_dict=section_values)
|
||||
|
@@ -60,7 +60,7 @@ def refresh_users():
|
||||
else:
|
||||
item['custom_avatar_url'] = item['thumb']
|
||||
|
||||
monitor_db.upsert('users', item, keys_dict)
|
||||
monitor_db.upsert('users', keys_dict=keys_dict, value_dict=item)
|
||||
|
||||
query = 'UPDATE users SET is_active = 0 WHERE user_id NOT IN ({})'.format(', '.join(['?'] * len(user_ids)))
|
||||
monitor_db.action(query=query, args=user_ids)
|
||||
|
Reference in New Issue
Block a user