diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 33867a5d..517f9b3b 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -264,8 +264,12 @@ class UploadSnapshotForm(FlaskForm, SnapshotMix): except ValidationError as err: txt = "{}".format(err) uuid = snapshot_json.get('uuid') + wbid = snapshot_json.get('wbid') error = SnapshotErrors( - description=txt, snapshot_uuid=uuid, severity=Severity.Error + description=txt, + snapshot_uuid=uuid, + severity=Severity.Error, + wbid=wbid, ) error.save(commit=True) self.result[filename] = 'Error' diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index 70e54de1..339eea2b 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -273,7 +273,6 @@ class UploadSnapshotView(GenericMixView): 'version': __version__, } if form.validate_on_submit(): - # import pdb; pdb.set_trace() snapshot, devices = form.save(commit=False) if lot_id: lot = lots.filter(Lot.id == lot_id).one()