From ff7f8886111bd35a3729aabcf364d1541d8e5963 Mon Sep 17 00:00:00 2001 From: asmorodskyi Date: Wed, 15 Jun 2022 16:19:53 +0200 Subject: [PATCH] Allow missing openqa_created_by tag in metadata --- ocw/lib/emailnotify.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocw/lib/emailnotify.py b/ocw/lib/emailnotify.py index cb962fc1..9508b773 100644 --- a/ocw/lib/emailnotify.py +++ b/ocw/lib/emailnotify.py @@ -23,10 +23,13 @@ def draw_instance_table(objects): hours, remainder = divmod(i.age.total_seconds(), 3600) minutes, seconds = divmod(remainder, 60) link = i.get_openqa_job_link() + created_by = 'N/A' + if 'openqa_created_by' in j['tags']: + created_by = j['tags']['openqa_created_by'] table.add_row([ i.provider, i.instance_id, - j['tags']['openqa_created_by'], + created_by, i.vault_namespace, i.age_formated(), build_absolute_uri(reverse(views.delete, args=[i.id])),