From 5f75f1ef197d7cae73bdfbdd3484bb64d803e08d Mon Sep 17 00:00:00 2001 From: mprahl Date: Feb 26 2019 12:36:34 +0000 Subject: Treat "brew-build" subject type as an alias for "koji_build" Greenwave expects only values of koji_build since that's what the policies apply to. --- diff --git a/waiverdb/api_v1.py b/waiverdb/api_v1.py index f3c1ebd..ddf9cb9 100644 --- a/waiverdb/api_v1.py +++ b/waiverdb/api_v1.py @@ -375,6 +375,10 @@ class WaiversResource(Resource): if not args['testcase']: raise BadRequest({'testcase': 'Missing required parameter in the JSON body'}) + # brew-build is an alias for koji_build + if args['subject_type'] == 'brew-build': + args['subject_type'] = 'koji_build' + return Waiver( args['subject_type'], args['subject_identifier'],