From 08f653ecf35ffccc4d4572217ea54061a3211391 Mon Sep 17 00:00:00 2001 From: Tore Brede <Tore.Brede@uib.no> Date: Tue, 22 Feb 2022 16:51:36 +0100 Subject: [PATCH] Fixing mypy warning --- greg/tests/api/test_person.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/greg/tests/api/test_person.py b/greg/tests/api/test_person.py index 18accb28..87877314 100644 --- a/greg/tests/api/test_person.py +++ b/greg/tests/api/test_person.py @@ -537,7 +537,7 @@ def test_person_consent_add( def test_person_consent_patch( client: APIClient, person: Person, consent_fixture_choice_yes: Consent ): - consent_id = person.consents.first().id + consent_id = person.consents.get().id url = reverse( "v1:person_consent-detail", kwargs={"person_id": person.id, "id": consent_id} ) @@ -559,7 +559,7 @@ def test_person_consent_patch( def test_person_consent_delete( client: APIClient, person: Person, consent_fixture_choice_yes: Consent ): - consent_id = person.consents.first().id + consent_id = person.consents.get().id get_url = reverse("v1:person_consent-list", kwargs={"person_id": person.id}) consents_for_person = client.get(get_url).json()["results"] -- GitLab