Skip to content
Snippets Groups Projects
Commit a83b3fb4 authored by Julian's avatar Julian
Browse files

Add field `count_as_missed_lesson` to ExcuseTypes

parent 01ba81df
No related branches found
No related tags found
1 merge request!274Resolve "[Excuses] Excuse types that change absence count / are uncounted"
# Generated by Django 3.2.12 on 2022-03-20 10:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('alsijil', '0015_fix_unique_personal_note'),
]
operations = [
migrations.AddField(
model_name='excusetype',
name='count_as_missed_lesson',
field=models.BooleanField(default=True, help_text="If checked, this excuse type will be counted as missed lesson. If not checked, it won't show up in the absence report.", verbose_name='Count as missed lesson'),
),
]
......@@ -50,6 +50,13 @@ class ExcuseType(ExtensibleModel):
short_name = models.CharField(max_length=255, unique=True, verbose_name=_("Short name"))
name = models.CharField(max_length=255, unique=True, verbose_name=_("Name"))
count_as_missed_lesson = models.BooleanField(
default=True,
verbose_name=_("Count as missed lesson"),
help_text=_("If checked, this excuse type will be counted as missed lesson. If not checked, it won't show up "
"in the absence report."),
)
def __str__(self):
return f"{self.name} ({self.short_name})"
......
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