preliminary commits for allowing voevent and emobservation creation for superevents

parent 8b417d25
......@@ -1252,8 +1252,15 @@ class GraceDb(GsiRest):
cleanListInput,
[raList, raWidthList, decList, decWidthList, startTimeList, durationList]))
template = self.templates['emobservation-list-template']
uri = template.format(graceid=graceid)
is_superevent = kwargs.pop('is_superevent', False)
if is_superevent:
template = self.templates['superevent-emobservation-list-template']
uri_kwargs = {'superevent_id': object_id}
else:
template = self.templates['emobservation-list-template']
uri_kwargs = {'graceid': object_id}
uri = template.format(**uri_kwargs)
body = {
'group' : group,
......@@ -1590,6 +1597,9 @@ class GraceDb(GsiRest):
Any other kwargs will be ignored.
"""
is_superevent = kwargs.pop('is_superevent', False)
if is_superevent:
raise NotImplementedError('Not yet implemented for superevents')
# validate facility, waveband, eel_status, and obs_status
voevent_type = self._getCode(voevent_type.lower(), self.voevent_types)
if not voevent_type:
......
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