File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -137,13 +137,14 @@ def delete_event(request: Request,
137137 db .query (UserEvent ).filter (UserEvent .event_id == event_id ).delete ()
138138
139139 db .commit ()
140- if participants and event .start > datetime .now ():
141- pass
142- # TODO: Send them a cancellation notice
143- # if the deletion is successful
144- return RedirectResponse (
145- url = "/calendar" , status_code = status .HTTP_200_OK )
140+
146141 except (SQLAlchemyError , TypeError ):
147142 return templates .TemplateResponse (
148143 "event/eventview.html" , {"request" : request , "event_id" : event_id },
149144 status_code = status .HTTP_500_INTERNAL_SERVER_ERROR )
145+ if participants and event .start > datetime .now ():
146+ pass
147+ # TODO: Send them a cancellation notice
148+ # if the deletion is successful
149+ return RedirectResponse (
150+ url = "/calendar" , status_code = status .HTTP_200_OK )
You can’t perform that action at this time.
0 commit comments