From ae6603d5e625876451ab64ec6aaeac4a95037287 Mon Sep 17 00:00:00 2001 From: Nathaniel Kofalt <nathaniel@kofalt.com> Date: Wed, 27 Sep 2017 16:13:10 -0500 Subject: [PATCH] Ensure ContainerReference types are singular --- api/dao/containerutil.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/dao/containerutil.py b/api/dao/containerutil.py index e7198a99..619caac1 100644 --- a/api/dao/containerutil.py +++ b/api/dao/containerutil.py @@ -149,6 +149,8 @@ class ContainerReference(object): # TODO: refactor to resolve pylint warning def __init__(self, type, id): + type = singularize(type) + if type not in CONT_TYPES: raise Exception('Container type must be one of {}'.format(CONT_TYPES)) -- GitLab