Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Dec 4, 2023
1 parent bfa56b2 commit 5411871
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 1 addition & 3 deletions core/views/qr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 5411871

Please sign in to comment.