Spaces:
Sleeping
Sleeping
a-v-bely
commited on
Commit
•
285aeaf
1
Parent(s):
3eb9275
typo
Browse files
utilities_database/user_database_utils.py
CHANGED
@@ -190,16 +190,16 @@ def save_data_in_database(user_task_database, save_type, save_name, cefr_level,
|
|
190 |
already_saved = user_task_database.select('*').execute().data
|
191 |
already_saved_names = [task for task in already_saved
|
192 |
if (task['creator_name']==creator_name
|
193 |
-
|
194 |
-
|
195 |
already_saved_tasks = [task for task in already_saved
|
196 |
if (task['creator_name']==creator_name
|
197 |
-
|
198 |
-
|
199 |
already_saved_tests = [task for task in already_saved
|
200 |
if (task['test_taker_name']==test_taker_name
|
201 |
-
|
202 |
-
|
203 |
|
204 |
if save_name == '' and save_type == 'download':
|
205 |
save_name = generated_result['name']
|
|
|
190 |
already_saved = user_task_database.select('*').execute().data
|
191 |
already_saved_names = [task for task in already_saved
|
192 |
if (task['creator_name']==creator_name
|
193 |
+
and task['save_name']==save_name
|
194 |
+
and task['cefr_level']==cefr_level)]
|
195 |
already_saved_tasks = [task for task in already_saved
|
196 |
if (task['creator_name']==creator_name
|
197 |
+
and task['generated_result']==generated_result
|
198 |
+
and task['cefr_level']==cefr_level)]
|
199 |
already_saved_tests = [task for task in already_saved
|
200 |
if (task['test_taker_name']==test_taker_name
|
201 |
+
and task['save_name']==save_name
|
202 |
+
and task['cefr_level']==cefr_level)]
|
203 |
|
204 |
if save_name == '' and save_type == 'download':
|
205 |
save_name = generated_result['name']
|