Skip to content
Snippets Groups Projects
Commit 127939d9 authored by Frank Poetzsch-Heffter's avatar Frank Poetzsch-Heffter
Browse files

rename class to aktuell in generate_pdf, exclude flags b (Verfügungsstunde)...

rename class to aktuell in generate_pdf, exclude flags b (Verfügungsstunde) and F (Lehrerfrei) in get_substituitions_by_date
parent bd6d5210
No related branches found
No related tags found
No related merge requests found
from django.utils import timezone from django.utils import timezone
from django.db.models import Q
from untisconnect import models from untisconnect import models
from untisconnect.api import run_default_filter, row_by_row_helper, format_classes, get_all_absences_by_date, \ from untisconnect.api import run_default_filter, row_by_row_helper, format_classes, get_all_absences_by_date, \
...@@ -316,7 +317,7 @@ def get_header_information(subs, date, events=[]): ...@@ -316,7 +317,7 @@ def get_header_information(subs, date, events=[]):
def get_substitutions_by_date(date): def get_substitutions_by_date(date):
subs_raw = run_default_filter( subs_raw = run_default_filter(
run_using(models.Substitution.objects.filter(date=date_to_untis_date(date), deleted=0).exclude( run_using(models.Substitution.objects.filter(date=date_to_untis_date(date), deleted=0).exclude(
flags__contains="N").order_by("classids", "lesson")), Q(flags__contains="N") | Q(flags__contains="b") | Q(flags__contains="F")).order_by("classids", "lesson")),
filter_term=False) filter_term=False)
subs = row_by_row_helper(subs_raw, Substitution) subs = row_by_row_helper(subs_raw, Substitution)
......
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