-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change minimum submission removal limit to 0 #4819
Change minimum submission removal limit to 0 #4819
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4819 +/- ##
=======================================
Coverage 96.55% 96.55%
=======================================
Files 748 748
Lines 25423 25423
Branches 3362 3362
=======================================
Hits 24548 24548
Misses 610 610
Partials 265 265 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see a test that creates a submission on timestamp t0 with a form configured to delete submissions after 0 days, and then the delete_submissions
is invoked a couple of hours later (e.g. submission create at 18:00 and delete runs at 01:00 AM) to confirm that the submission is then indeed deleted.
I'm seeing some code with the annotations of how old a submission is that I'm not 100% convinced yet this patch fully resolves the problem.
all_submissions_removal_limit=7, | ||
) | ||
|
||
with freeze_time(lambda: datetime(2024, 11, 12, 18)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's up with the lambda? Is there a reason you can't do:
with freeze_time("2024-11-12T18:00:00+01:00"):
furthermore, never ever use naive datetimes in python/django (yours is naive, because no tzinfo
has been specified). Generally you want to use the django wrappers defined in django.utils.timezone
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, that lambda isn't needed 👍
Ah okay, check. I'll keep it in mind
Allowing submissions to be deleted after 0 days (i.e. on the same day)
74747f9
to
e39f7a3
Compare
e39f7a3
to
9e77550
Compare
Closes #4815
Changes
Allowing submissions to be deleted after 0 days.
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Commit hygiene