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

Merge branch...

Merge branch '239-property-count_label-of-excusetype-allowing-whitespaces-in-it-breaks-usage-of-it-as-column-alias' into 'prepare-release-3.0b0'

Resolve "Property count_label of ExcuseType and ExtraMark allowing whitespaces in it breaks usage of it as column alias"

See merge request !324
parents 9e409787 76279751
No related branches found
No related tags found
2 merge requests!324Resolve "Property count_label of ExcuseType and ExtraMark allowing whitespaces in it breaks usage of it as column alias",!323Prepare release 3.0b0
Pipeline #118895 failed
......@@ -11,6 +11,8 @@ Unreleased
Fixed
~~~~~
* In some cases, pages showing the count of extra marks and lessons with custom excuse types of
persons threw an error.
* The redirection to generated class register PDF printouts did not work.
`3.0b0`_ - 2022-02-28
......
from datetime import date
from typing import Optional, Union
from urllib.parse import urlparse
from uuid import uuid4
from django.db import models
from django.db.models.constraints import CheckConstraint
from django.db.models.query_utils import Q
from django.urls import reverse
from django.utils.formats import date_format
from django.utils.text import slugify
from django.utils.translation import gettext_lazy as _
from calendarweek import CalendarWeek
......@@ -66,7 +68,7 @@ class ExcuseType(ExtensibleModel):
@property
def count_label(self):
return f"{self.short_name}_count"
return f"excuse_type_{self.id}_count"
class Meta:
ordering = ["name"]
......@@ -437,7 +439,7 @@ class ExtraMark(ExtensibleModel):
@property
def count_label(self):
return f"{self.short_name}_count"
return f"extra_mark_{self.id}_count"
class Meta:
ordering = ["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