error on bluetooth queryset

This commit is contained in:
d0c 2023-01-11 17:44:59 +01:00
parent dad503b913
commit 9235105dcb
2 changed files with 5 additions and 3 deletions

View file

@ -32,11 +32,13 @@ class Command(BaseCommand):
for subkey, subvalue in value.items(): for subkey, subvalue in value.items():
setattr(bt, subkey, subvalue) setattr(bt, subkey, subvalue)
bt.save() bt.save()
dev.bluetooth = bt
#for subkey, subvalue in value.items(): #for subkey, subvalue in value.items():
# setattr(bt, subkey, subvalue) # setattr(bt, subkey, subvalue)
# bt.save() # bt.save()
# elif key == "cameras": elif key == "cameras":
# cam = [] print('camera')
# cam = []
# for c in Camera.objects.filter(*value.items()) # for c in Camera.objects.filter(*value.items())
# cam.append(c) # cam.append(c)
# if not cam.exists(): # if not cam.exists():

View file

@ -8,7 +8,7 @@ class Bluetooth(models.Model):
profiles = models.CharField(max_length=100) profiles = models.CharField(max_length=100)
def __str__(self): def __str__(self):
return f"Bluetooth: {self.spec - self.profiles}" return f"Bluetooth: {self.spec} - {self.profiles}"
class Camera(models.Model): class Camera(models.Model):