From c0081e32b17c9707d493687190836bd30d1dcce9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 14 Jun 2022 10:48:01 +0200 Subject: [PATCH] fix uuid in device not computer --- ereuse_devicehub/inventory/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 2160b692..df564982 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -29,7 +29,6 @@ from wtforms.fields import FormField from ereuse_devicehub.db import db from ereuse_devicehub.inventory.models import DeliveryNote, ReceiverNote, Transfer -from ereuse_devicehub.parser.models import SnapshotsLog from ereuse_devicehub.parser.parser import ParseSnapshotLsHw from ereuse_devicehub.parser.schemas import Snapshot_lite from ereuse_devicehub.resources.action.models import Snapshot, Trade @@ -271,7 +270,8 @@ class UploadSnapshotForm(SnapshotMixin, FlaskForm): else: self.version = snapshot_json.get('version') system_uuid = self.get_uuid(debug) - snapshot_json['device']['uuid'] = system_uuid + if system_uuid: + snapshot_json['device']['uuid'] = system_uuid try: snapshot_json = schema.load(snapshot_json)