Satisfied screenshot tests

This commit is contained in:
2020-09-29 19:36:42 +02:00
parent 09bfbeedc4
commit 96d6dc72fb
2 changed files with 6 additions and 2 deletions

View File

@@ -198,7 +198,7 @@
<a role="button" href="#collapseStatusLog" data-toggle="collapse"
data-parent="#log-accordion" aria-expanded="true"
aria-controls="collapseStatusLog">
Status-Log
Status-Flags
</a>
</h5>
</div>

View File

@@ -60,7 +60,11 @@ def render_event_changelog(event):
subchanges = json.loads(change.content)
for subchange in subchanges:
field_label = event._meta.get_field(subchange['field']).verbose_name
if len(subchange['refer']) + len(subchange['current']) > 20:
try:
is_long_strings = (len(subchange['refer']) + len(subchange['current'])) > 20
except TypeError:
is_long_strings = False
if is_long_strings:
separator1 = u'<br />'
separator2 = u'<br />'
else: