From 54118710d9dc6433abab59903669d6b48c1ba6a6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 4 Dec 2023 21:47:26 +0000 Subject: [PATCH] format --- core/models.py | 4 +++- core/views/qr.py | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/models.py b/core/models.py index 589c1b3..aae8ec1 100644 --- a/core/models.py +++ b/core/models.py @@ -77,7 +77,9 @@ def __str__(self): return f"{self.id} {self.short or self.location}" @classmethod - def codes(cls, team: "Team") -> List[QrCode]: # todo: have this return an ordered QuerySet instead of a list + def codes( + cls, team: "Team" + ) -> List[QrCode]: # todo: have this return an ordered QuerySet instead of a list pks = QrCode.code_pks(team) return [QrCode.objects.get(id=a) for a in pks] diff --git a/core/views/qr.py b/core/views/qr.py index 177bcac..fa7f8e2 100644 --- a/core/views/qr.py +++ b/core/views/qr.py @@ -158,9 +158,7 @@ def qr_current(request): def qr_catalog(request): i = request.user.team.current_qr_i context = dict(first=i == 0, current=True) - context["qr"] = QrCode.codes(request.user.team)[ - : request.user.team.current_qr_i - ] + context["qr"] = QrCode.codes(request.user.team)[: request.user.team.current_qr_i] return render(request, "core/qr_catalog.html", context=context)