don't traceback from tag_notification is the build_id doesn't exist

This commit is contained in:
Mike Bonnet 2007-08-20 12:51:21 -04:00
parent 5e0760d6b9
commit 6025b08a20

View file

@ -3554,6 +3554,9 @@ def tag_notification(is_successful, tag_id, from_id, build_id, user_id, ignore_s
state = koji.BUILD_STATES['FAILED']
recipients = {}
build = get_build(build_id)
if not build:
# the build doesn't exist, so there's nothing to send a notification about
return None
if tag_id:
tag = get_tag(tag_id)
for email in get_notification_recipients(build, tag['id'], state):