diff --git a/.gitignore b/.gitignore index 1cae045..a302af2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ config.php test.php -melly-to-grist/.env +.env **/__pycache__ -new-registration-app/database.db \ No newline at end of file +database.db* +.idea \ No newline at end of file diff --git a/src/meal_manager/main.py b/src/meal_manager/main.py index 008b188..ef14d33 100644 --- a/src/meal_manager/main.py +++ b/src/meal_manager/main.py @@ -433,7 +433,14 @@ def get_event_attendance_pdf(event_id: int, session: SessionDep): @app.get("/event/{event_id}/sync_with_grist") def sync_with_grist_route(event_id: int, session: SessionDep, user: StrictUserDep): + """ + Synchronizes the specified event with Grist and redirects the user. + This function retrieves the event by its identifier, synchronizes it with Grist, + and then redirects the user to the event page with a success message. + + TODO: Error handling + """ statement = select(Event).where(Event.id == event_id) event = session.scalars(statement).one()