-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce "too late" as an event presence status
Similar to the "not present" status, the user will automatically recieve a penalty. I figured all previous penalties can be removed since only the newest one should matter. I would like some input as to how this will affect other penalties, e.g. given due to late payments (or other things?), as they will also be removed if the presence is changed to something worthy of a penalty. Should we consider to introduce "penalty types" stored on the record, e.g. "presence", "payment", "other"? Also, this resolves a bug, as it is currently not possible to auto delete previous penalties related to the event due to the `.delete()` not being at the end the atomic block. Not sure why it had to be atomic in the first place.
- Loading branch information
1 parent
c48fb05
commit 9ed1443
Showing
4 changed files
with
61 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
lego/apps/events/migrations/0040_alter_registration_presence.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 4.0.10 on 2024-03-06 22:04 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("events", "0039_remove_event_use_contact_tracing"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="registration", | ||
name="presence", | ||
field=models.CharField( | ||
choices=[ | ||
("UNKNOWN", "Unknown"), | ||
("PRESENT", "Present"), | ||
("LATE", "Late"), | ||
("NOT_PRESENT", "Not Present"), | ||
], | ||
default="UNKNOWN", | ||
max_length=20, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters