Commit graph

23 commits

Author SHA1 Message Date
Bart Schuurmans 0d621b68e0 Reorder operations in save() overrides
Accessing many-to-many relations before saving is no longer allowed.

Reorder all operations consistently:
1. Validations
2. Modify own fields
3. Perform save by calling super().save()
4. Modify related objects and clear caches

Especially clearing caches should be done after actually saving, otherwise the old data can be
re-added immediately by another request before the new data is written.
2024-04-25 10:12:30 +02:00
Josh Soref 3526d9fd19 spelling: progress
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
0x29a cbd75dc766 Minor performance improvements 2023-01-27 20:24:53 +01:00
Mouse Reeve 4c5d2570ab Save and display stopped date in readthrough 2022-05-26 11:53:33 -07:00
Mouse Reeve 375c5a8789 Adds stopped date separate from finish date on readthrough 2022-05-26 11:36:37 -07:00
Mouse Reeve 82294909a8 Python formatting 2022-01-08 16:38:52 -08:00
Mouse Reeve c54609d7fd Refactors how readthroughs get updated 2021-09-22 16:08:25 -07:00
Mouse Reeve 8648bdc879 Merge branch 'main' into refactor-readthroughs 2021-09-22 15:08:58 -07:00
Mouse Reeve 2160a5c729 Newly created readthroughs are active by default 2021-09-22 13:00:38 -07:00
Mouse Reeve a05ef1a222 Adds active field to readthrough model 2021-09-22 11:23:56 -07:00
Mouse Reeve 2419942770 Create model function to update user last active date 2021-09-22 08:35:20 -07:00
Mouse Reeve 1be125fc1d Adds database constraint for readthrough dates 2021-08-11 11:19:06 -07:00
Mouse Reeve cfbe1b29cd Pass update fields when ticking last active date 2021-08-03 09:12:22 -07:00
Mouse Reeve 3ade2d3bb1 New version of black, new whitespace 2021-04-26 09:15:42 -07:00
Mouse Reeve 2a612f7278 Formatting 2021-03-20 17:39:05 -07:00
Mouse Reeve 942c4a6664 Move progress updates into modal 2021-03-20 17:18:18 -07:00
Mouse Reeve 70296e760b Runs black 2021-03-08 08:49:10 -08:00
Mouse Reeve ffd0759f6f Fixes field and lists tests 2021-02-06 16:13:59 -08:00
Mouse Reeve c7c975d695 Use save method override instead of a signal
and gets the new test file working
2021-02-06 12:00:47 -08:00
Joel Bradshaw 070fa04b63 Add validators and more tests
I don't think these validators will do anything unless we use them or
are submitting a form, but they're there nonetheless
2021-01-19 23:40:11 -08:00
Joel Bradshaw 32346cf9a3 Cascade-delete progress updates
Add a warning about it, and update test to confirm it works
2021-01-19 22:36:44 -08:00
Joel Bradshaw 48147883ce Merge branch 'main' into progress_update 2021-01-13 19:53:26 -08:00
Mouse Reeve 521934b4f3 Moves models that don't inherit Status to their own files 2021-01-01 10:46:15 -08:00