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():
setattr(bt, subkey, subvalue)
bt.save()
dev.bluetooth = bt
#for subkey, subvalue in value.items():
# setattr(bt, subkey, subvalue)
# bt.save()
# elif key == "cameras":
# cam = []
elif key == "cameras":
print('camera')
# cam = []
# for c in Camera.objects.filter(*value.items())
# cam.append(c)
# if not cam.exists():

View file

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