|
1 | 1 | import logging |
| 2 | +from datetime import date |
2 | 3 | from typing import Any, Optional |
3 | 4 |
|
4 | 5 | from fastapi import APIRouter, Depends, HTTPException |
@@ -303,6 +304,7 @@ async def add_score_set_to_collection( |
303 | 304 | assert_permission(user_data, item, Action.ADD_SCORE_SET) |
304 | 305 |
|
305 | 306 | item.score_sets.append(score_set) |
| 307 | + item.modification_date = date.today() |
306 | 308 | item.modified_by = user_data.user |
307 | 309 |
|
308 | 310 | db.add(item) |
@@ -367,6 +369,7 @@ async def delete_score_set_from_collection( |
367 | 369 | assert_permission(user_data, item, Action.ADD_SCORE_SET) |
368 | 370 |
|
369 | 371 | item.score_sets.remove(score_set) |
| 372 | + item.modification_date = date.today() |
370 | 373 | item.modified_by = user_data.user |
371 | 374 |
|
372 | 375 | db.add(item) |
@@ -421,6 +424,7 @@ async def add_experiment_to_collection( |
421 | 424 | assert_permission(user_data, item, Action.ADD_EXPERIMENT) |
422 | 425 |
|
423 | 426 | item.experiments.append(experiment) |
| 427 | + item.modification_date = date.today() |
424 | 428 | item.modified_by = user_data.user |
425 | 429 |
|
426 | 430 | db.add(item) |
@@ -483,6 +487,7 @@ async def delete_experiment_from_collection( |
483 | 487 | assert_permission(user_data, item, Action.ADD_EXPERIMENT) |
484 | 488 |
|
485 | 489 | item.experiments.remove(experiment) |
| 490 | + item.modification_date = date.today() |
486 | 491 | item.modified_by = user_data.user |
487 | 492 |
|
488 | 493 | db.add(item) |
|
0 commit comments