Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/temp' into temp
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Dec 4, 2023
2 parents afa8ed8 + 5411871 commit a310f26
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 @@ -161,9 +161,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 a310f26

Please sign in to comment.