Tweaked a log.assertion() case.

- Legacy-Id: 17793
This commit is contained in:
Henrik Levkowetz 2020-05-14 15:47:41 +00:00
parent b53d78a0ad
commit 3439f3d42c

View file

@ -133,7 +133,7 @@ def validate_submission_rev(name, rev):
expected = 0
existing_revs = [int(i.rev) for i in Document.objects.filter(name=name) if i.rev and i.rev.isdigit() ]
unexpected_revs = [ i.rev for i in Document.objects.filter(name=name) if not (i.rev and i.rev.isdigit()) ] # pyflakes:ignore
unexpected_revs = [ i.rev for i in Document.objects.filter(name=name) if i.rev and not i.rev.isdigit() ] # pyflakes:ignore
log.assertion('unexpected_revs', [])
if existing_revs:
expected = max(existing_revs) + 1