Commit 41dc0cfa authored by Tanner Prestegard's avatar Tanner Prestegard

Adding argument check for voevent creation

parent 6115e9f0
......@@ -1766,8 +1766,14 @@ class GraceDb(GsiRest):
raise ValueError("voevent_type must be one of: {0}".format(
list(self.voevent_types.values())))
# TODO:
# Require skymaps for 'update' and 'initial'
if voevent_type == 'IN':
if not skymap_filename:
raise ValueError("Skymap file is required for 'initial' "
"VOEvents")
if not skymap_image_filename:
raise ValueError("Skymap image file is required for 'initial' "
"VOEvents")
# Construct request body
body = {
......
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