Skip to content
Snippets Groups Projects
Commit 3d42d465 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

don't delete previewyear on dry_run

parent aff5eeac
No related branches found
No related tags found
No related merge requests found
...@@ -305,6 +305,7 @@ def publish_survey(year) -> Any: ...@@ -305,6 +305,7 @@ def publish_survey(year) -> Any:
except ValueError as e: except ValueError as e:
return {'message': str(e)}, 400 return {'message': str(e)}, 400
if not dry_run:
db.session.execute(delete(PreviewYear).where(PreviewYear.year == year)) db.session.execute(delete(PreviewYear).where(PreviewYear.year == year))
survey.status = SurveyStatus.published survey.status = SurveyStatus.published
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment