fix uuid in device not computer
This commit is contained in:
parent
86446a268c
commit
c0081e32b1
|
@ -29,7 +29,6 @@ from wtforms.fields import FormField
|
||||||
|
|
||||||
from ereuse_devicehub.db import db
|
from ereuse_devicehub.db import db
|
||||||
from ereuse_devicehub.inventory.models import DeliveryNote, ReceiverNote, Transfer
|
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.parser import ParseSnapshotLsHw
|
||||||
from ereuse_devicehub.parser.schemas import Snapshot_lite
|
from ereuse_devicehub.parser.schemas import Snapshot_lite
|
||||||
from ereuse_devicehub.resources.action.models import Snapshot, Trade
|
from ereuse_devicehub.resources.action.models import Snapshot, Trade
|
||||||
|
@ -271,6 +270,7 @@ class UploadSnapshotForm(SnapshotMixin, FlaskForm):
|
||||||
else:
|
else:
|
||||||
self.version = snapshot_json.get('version')
|
self.version = snapshot_json.get('version')
|
||||||
system_uuid = self.get_uuid(debug)
|
system_uuid = self.get_uuid(debug)
|
||||||
|
if system_uuid:
|
||||||
snapshot_json['device']['uuid'] = system_uuid
|
snapshot_json['device']['uuid'] = system_uuid
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Reference in a new issue