Added code to catch bad rev numbers for bibxml3 requests.

- Legacy-Id: 16963
This commit is contained in:
Henrik Levkowetz 2019-11-05 18:24:45 +00:00
parent c233f07b5d
commit 5d8aa656a5

View file

@ -842,6 +842,8 @@ def document_bibxml(request, name, rev=None):
if rev == h.rev:
doc = h
break
if rev and rev != doc.rev:
raise Http404("Revision not found")
try:
doc_event = NewRevisionDocEvent.objects.get(doc__name=doc.name, rev=(rev or latest_rev))