Skip to content
Snippets Groups Projects
Commit ae6603d5 authored by Nathaniel Kofalt's avatar Nathaniel Kofalt
Browse files

Ensure ContainerReference types are singular

parent 124ea0c4
No related branches found
No related tags found
No related merge requests found
...@@ -149,6 +149,8 @@ class ContainerReference(object): ...@@ -149,6 +149,8 @@ class ContainerReference(object):
# TODO: refactor to resolve pylint warning # TODO: refactor to resolve pylint warning
def __init__(self, type, id): def __init__(self, type, id):
type = singularize(type)
if type not in CONT_TYPES: if type not in CONT_TYPES:
raise Exception('Container type must be one of {}'.format(CONT_TYPES)) raise Exception('Container type must be one of {}'.format(CONT_TYPES))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment