fix wbid bug

This commit is contained in:
Cayo Puigdefabregas 2022-04-12 11:13:08 +02:00
parent 089dc92d62
commit c8b11cf505
2 changed files with 5 additions and 2 deletions

View file

@ -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'

View file

@ -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()