Compare commits

..

No commits in common. "e2cd688eff1464a90800fe9d4dead36efcf2deee" and "7a6f64fce0c3afcea3667f7324ee6798d5915ea8" have entirely different histories.

6 changed files with 1487 additions and 1504 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1480
dist/assets/index-DwAImxSO.js vendored Normal file

File diff suppressed because one or more lines are too long

4
dist/index.html vendored
View file

@ -5,8 +5,8 @@
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title> <title>Vite App</title>
<script type="module" crossorigin src="/assets/index-Bxk5297m.js"></script> <script type="module" crossorigin src="/assets/index-DwAImxSO.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BaLleNnd.css"> <link rel="stylesheet" crossorigin href="/assets/index--WxSYaVD.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View file

@ -61,7 +61,6 @@ def read_exercise_dir():
def backup_exercises_progress(): def backup_exercises_progress():
global LAST_BACKUP
toBackup = { toBackup = {
'EXERCISES_STATUS': db.EXERCISES_STATUS, 'EXERCISES_STATUS': db.EXERCISES_STATUS,
'SELECTED_EXERCISES': db.SELECTED_EXERCISES, 'SELECTED_EXERCISES': db.SELECTED_EXERCISES,
@ -248,8 +247,8 @@ def get_available_tasks_for_user(user_id: int) -> list[str]:
def get_model_action(data: dict): def get_model_action(data: dict):
if 'Log' in data or 'AuditLog' in data: if 'Log' in data:
data = data['Log'] if 'Log' in data else data['AuditLog'] data = data['Log']
if 'model' in data and 'action' in data: if 'model' in data and 'action' in data:
return (data['model'], data['action'],) return (data['model'], data['action'],)
return (None, None,) return (None, None,)
@ -261,7 +260,6 @@ def is_accepted_query(data: dict) -> bool:
# # improved condition below. It blocks some queries # # improved condition below. It blocks some queries
# if data['Log']['change'].startswith('attribute_count'): # if data['Log']['change'].startswith('attribute_count'):
# return False # return False
if 'Log' in data:
if data['Log']['change'].startswith('Validation errors:'): if data['Log']['change'].startswith('Validation errors:'):
return False return False
return True return True
@ -432,13 +430,6 @@ def parse_event_id_from_log(data: dict) -> Union[int, None]:
if event_id_search is not None: if event_id_search is not None:
event_id = event_id_search.group(1) event_id = event_id_search.group(1)
return event_id return event_id
elif 'AuditLog' in data:
log = data['AuditLog']
if 'model' in log and 'model_id' in log and log['model'] == 'Event':
return int(log['model_id'])
if 'change' in log:
if 'event_id' in log:
return int(log['event_id'])
return None return None

View file

@ -75,10 +75,6 @@ def get_user_id(data: dict):
data = data['Log'] data = data['Log']
if 'user_id' in data: if 'user_id' in data:
return int(data['user_id']) return int(data['user_id'])
if 'AuditLog' in data:
data = data['AuditLog']
if 'user_id' in data:
return int(data['user_id'])
return None return None