bt complete

This commit is contained in:
d0c 2023-01-12 01:38:20 +01:00
parent 119ecd5244
commit 6a2cc0c775

View file

@ -25,6 +25,7 @@ class Command(BaseCommand):
data = yaml.safe_load(stream)
dev = Device()
for key, value in data.items():
print(key)
if key == "bluetooth":
bt = Bluetooth.objects.filter(**value)
if not bt.exists():
@ -32,10 +33,8 @@ class Command(BaseCommand):
for subkey, subvalue in value.items():
setattr(bt, subkey, subvalue)
bt.save()
dev.bluetooth = bt
#for subkey, subvalue in value.items():
# setattr(bt, subkey, subvalue)
# bt.save()
else:
dev.bluetooth = bt.get()
elif key == "cameras":
print('camera')
# cam = []