sample match-case
This commit is contained in:
parent
1e8f05304a
commit
6c3ce23e0e
1 changed files with 3 additions and 0 deletions
|
@ -25,6 +25,9 @@ class Command(BaseCommand):
|
||||||
data = yaml.safe_load(stream)
|
data = yaml.safe_load(stream)
|
||||||
dev = Device()
|
dev = Device()
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
|
#match caso:
|
||||||
|
# case dict():
|
||||||
|
# print('dict')
|
||||||
if key == "bluetooth":
|
if key == "bluetooth":
|
||||||
# get() returned more than one Bluetooth -- it returned 2!
|
# get() returned more than one Bluetooth -- it returned 2!
|
||||||
bt = Bluetooth.objects.filter(**value)
|
bt = Bluetooth.objects.filter(**value)
|
||||||
|
|
Loading…
Reference in a new issue