From 0daddb5b91ba8779b57cc9355787de24ba28ae22 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 10 May 2020 14:17:23 +0000 Subject: [PATCH] Changed a log.assertion() to provide more information about the unexpected situation. - Legacy-Id: 17770 --- ietf/submit/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/submit/utils.py b/ietf/submit/utils.py index 057054842..ccd2b1132 100644 --- a/ietf/submit/utils.py +++ b/ietf/submit/utils.py @@ -133,7 +133,8 @@ 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() ] - 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: expected = max(existing_revs) + 1