From 6c3ce23e0e058fd392238f09d88ed783b89755e4 Mon Sep 17 00:00:00 2001 From: d0c Date: Fri, 20 Jan 2023 16:47:00 +0100 Subject: [PATCH] sample match-case --- suitablephones/management/commands/fetchphones.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/suitablephones/management/commands/fetchphones.py b/suitablephones/management/commands/fetchphones.py index ac38f3f..b25d629 100644 --- a/suitablephones/management/commands/fetchphones.py +++ b/suitablephones/management/commands/fetchphones.py @@ -25,6 +25,9 @@ class Command(BaseCommand): data = yaml.safe_load(stream) dev = Device() for key, value in data.items(): + #match caso: + # case dict(): + # print('dict') if key == "bluetooth": # get() returned more than one Bluetooth -- it returned 2! bt = Bluetooth.objects.filter(**value)