Changed a log.assertion() to provide more information about the unexpected situation.
- Legacy-Id: 17770
This commit is contained in:
parent
26e85ce53b
commit
0daddb5b91
|
@ -133,7 +133,8 @@ def validate_submission_rev(name, rev):
|
||||||
|
|
||||||
expected = 0
|
expected = 0
|
||||||
existing_revs = [int(i.rev) for i in Document.objects.filter(name=name) if i.rev and i.rev.isdigit() ]
|
existing_revs = [int(i.rev) for i in Document.objects.filter(name=name) if i.rev and i.rev.isdigit() ]
|
||||||
log.assertion('[ i.rev for i in Document.objects.filter(name=name) if not (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()) ]
|
||||||
|
log.assertion('unexpected_revs', [])
|
||||||
if existing_revs:
|
if existing_revs:
|
||||||
expected = max(existing_revs) + 1
|
expected = max(existing_revs) + 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue