From f79e0fddcbf13542384a91904585dba75eaa756d Mon Sep 17 00:00:00 2001 From: Sasha Kogan Date: Wed, 22 Sep 2021 12:18:38 +0300 Subject: [PATCH] minor fx --- db_versioning/versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_versioning/versions.py b/db_versioning/versions.py index b781aa85..42498f70 100644 --- a/db_versioning/versions.py +++ b/db_versioning/versions.py @@ -146,7 +146,7 @@ def update_database(cls, collections, prev_version): for user in collections['users'].find(): criteria_dt = Checks(user['criteria']).get_checks() upd_criteria = {k: False if v == -1 else True for k, v in criteria_dt.items()} - upd_criteria['slides_number'] = {"sld_num": [10, 12], "detect_additional": True} if upd_criteria['slides_number'] else False + upd_criteria['slides_number'] = {"sld_num": criteria_dt['slides_number'], "detect_additional": True} if upd_criteria['slides_number'] else False collections['users'].update( {'_id': user['_id']}, {'$set': {'criteria': upd_criteria}}