From 6a693e0104c0c9a4f934077127ac30c88d2802fa Mon Sep 17 00:00:00 2001 From: Abhiuday Date: Fri, 20 Oct 2023 18:02:32 +0530 Subject: [PATCH] fix: fixed linting and test errors --- care/facility/api/viewsets/facility_users.py | 4 ++-- care/facility/migrations/0393_merge_20231020_1752.py | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 care/facility/migrations/0393_merge_20231020_1752.py diff --git a/care/facility/api/viewsets/facility_users.py b/care/facility/api/viewsets/facility_users.py index 44a5dca8d7..1636963026 100644 --- a/care/facility/api/viewsets/facility_users.py +++ b/care/facility/api/viewsets/facility_users.py @@ -50,5 +50,5 @@ def get_queryset(self): queryset=UserSkill.objects.filter(skill__deleted=False), ), ) - except Exception as e: - raise ValidationError({"Facility": "Facility not found"}) from e + except Facility.DoesNotExist: + raise ValidationError({"Facility": "Facility not found"}) diff --git a/care/facility/migrations/0393_merge_20231020_1752.py b/care/facility/migrations/0393_merge_20231020_1752.py new file mode 100644 index 0000000000..24ea3a04cf --- /dev/null +++ b/care/facility/migrations/0393_merge_20231020_1752.py @@ -0,0 +1,12 @@ +# Generated by Django 4.2.5 on 2023-10-20 12:22 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("facility", "0389_add_duty_staff"), + ("facility", "0392_alter_dailyround_consciousness_level"), + ] + + operations = []