fixed bug manual snapshots
This commit is contained in:
parent
c554d30291
commit
45950997f8
|
@ -181,6 +181,7 @@ class ActionView(View):
|
|||
def post(self):
|
||||
"""Posts an action."""
|
||||
|
||||
# import pdb; pdb.set_trace()
|
||||
json = request.get_json(validate=False)
|
||||
|
||||
if not json or 'type' not in json:
|
||||
|
@ -189,6 +190,10 @@ class ActionView(View):
|
|||
# defs
|
||||
resource_def = app.resources[json['type']]
|
||||
if json['type'] == Snapshot.t:
|
||||
if json.get('software') == 'Web':
|
||||
snapshot = SnapshotView(json, resource_def, self.schema)
|
||||
return snapshot.post()
|
||||
|
||||
if not 'data' in json:
|
||||
txt = 'Invalid snapshot'
|
||||
raise ValidationError(txt)
|
||||
|
|
Reference in New Issue