fix: Show requested rev if it is current, even w/o dochistory (#6703)

This commit is contained in:
Jennifer Richards 2023-11-29 10:20:46 -04:00 committed by GitHub
parent bcca519d67
commit b011f0ab32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,8 +210,8 @@ def document_main(request, name, rev=None, document_html=False):
snapshot = False
gh = None
if rev:
# find the entry in the history
if rev and rev != doc.rev:
# find the entry in the history if the rev requested is not the current rev
for h in doc.history_set.order_by("-time"):
if rev == h.rev:
snapshot = True