adding label check for writeLabel()

parent c160b71e
......@@ -1337,6 +1337,11 @@ class GraceDb(GsiRest):
201
"""
# Check label name
if label not in self.allowed_labels:
raise NameError(("Label '{0}' does not exist in the "
"database").format(label))
is_superevent = kwargs.pop('is_superevent', False)
if is_superevent:
template = self.templates['superevent-label-list-template']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment