Skip to content
Snippets Groups Projects
Verified Commit 79dbe405 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Force old negative tardiness values to 0 to prevent follow-up issues

parent ab1f4a35
No related branches found
No related tags found
1 merge request!146Resolve "Negative values for tardiness are not rejected"
Pipeline #6080 passed
......@@ -3,6 +3,11 @@
from django.db import migrations, models
def fix_negative_tardiness(apps, schema_editor):
PersonalNote = apps.get_model("alsijil", "PersonalNote")
PersonalNote.objects.filter(late__lt=0).update(late=0)
class Migration(migrations.Migration):
dependencies = [
......@@ -10,6 +15,7 @@ class Migration(migrations.Migration):
]
operations = [
migrations.RunPython(fix_negative_tardiness),
migrations.AlterField(
model_name='personalnote',
name='late',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment