Skip to content
Snippets Groups Projects
Verified Commit b3b28861 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

[Reformat] Fix variables

parent 147c56a9
No related branches found
No related tags found
No related merge requests found
...@@ -114,27 +114,27 @@ class TimePeriod(ExtensibleModel): ...@@ -114,27 +114,27 @@ class TimePeriod(ExtensibleModel):
return url_prev, url_next return url_prev, url_next
@classproperty @classproperty
def period_min(cls) -> int: def period_min(self, cls) -> int:
return cls.objects.aggregate(period__min=Coalesce(Min("period"), 1)).get("period__min") return cls.objects.aggregate(period__min=Coalesce(Min("period"), 1)).get("period__min")
@classproperty @classproperty
def period_max(cls) -> int: def period_max(self, cls) -> int:
return cls.objects.aggregate(period__max=Coalesce(Max("period"), 7)).get("period__max") return cls.objects.aggregate(period__max=Coalesce(Max("period"), 7)).get("period__max")
@classproperty @classproperty
def time_min(cls) -> Optional[time]: def time_min(self, cls) -> Optional[time]:
return cls.objects.aggregate(Min("time_start")).get("time_start__min") return cls.objects.aggregate(Min("time_start")).get("time_start__min")
@classproperty @classproperty
def time_max(cls) -> Optional[time]: def time_max(self, cls) -> Optional[time]:
return cls.objects.aggregate(Max("time_end")).get("time_end__max") return cls.objects.aggregate(Max("time_end")).get("time_end__max")
@classproperty @classproperty
def weekday_min(cls) -> int: def weekday_min(self, cls) -> int:
return cls.objects.aggregate(weekday__min=Coalesce(Min("weekday"), 0)).get("weekday__min") return cls.objects.aggregate(weekday__min=Coalesce(Min("weekday"), 0)).get("weekday__min")
@classproperty @classproperty
def weekday_max(cls) -> int: def weekday_max(self, cls) -> int:
return cls.objects.aggregate(weekday__max=Coalesce(Max("weekday"), 6)).get("weekday__max") return cls.objects.aggregate(weekday__max=Coalesce(Max("weekday"), 6)).get("weekday__max")
class Meta: class Meta:
......
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