Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/temp'
Browse files Browse the repository at this point in the history
# Conflicts:
#	config/uwsgi.conf
  • Loading branch information
JasonLovesDoggo committed Dec 2, 2023
2 parents ea491b8 + b5ce661 commit 53cf147
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/templates/core/qr.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
{% endif %}
</div>
{% endif %}
{% if not offpath %}
<div class="hint">
<div class="hint-top">
{% if nextqr %}
Expand Down Expand Up @@ -68,5 +69,5 @@
{% translate 'Oh ho? What lieth there? Tis the light at the end of the tunnel! <br /> Congratulations valiant scavenger and thank you for playing!' %}
{% endif %}
</div></div>

{% endif %}
{% endblock %}
3 changes: 2 additions & 1 deletion core/views/qr.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def qr(request, key):
context["qr"] = qr = get_object_or_404(QrCode, key=key)
codes = QrCode.code_pks(request.user.team)
if qr.id not in codes:
return "wrong qr"
context["offpath"] = True
return render(request, "core/qr.html", context=context)
i = codes.index(qr.id)
context["nextqr"] = (
None if len(codes) <= (j := i + 1) else QrCode.objects.get(id=codes[j])
Expand Down

0 comments on commit 53cf147

Please sign in to comment.