From 85877d06351877ba4b3207c8433b04831b65fd83 Mon Sep 17 00:00:00 2001 From: Charlotte <47758554+charludo@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:44:33 +0100 Subject: [PATCH] Update integreat_cms/cms/utils/internal_link_checker.py Co-authored-by: David Venhoff --- integreat_cms/cms/utils/internal_link_checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integreat_cms/cms/utils/internal_link_checker.py b/integreat_cms/cms/utils/internal_link_checker.py index 23acd1374a..d5fd8d7f61 100644 --- a/integreat_cms/cms/utils/internal_link_checker.py +++ b/integreat_cms/cms/utils/internal_link_checker.py @@ -343,7 +343,7 @@ def check_internal(url: Url) -> bool | None: # noqa: PLR0911 language_and_path += "/" language_slug, path = language_and_path.split("/", maxsplit=1) - if language_slug == "contact" and Contact.objects.filter(pk=path).first(): + if language_slug == "contact" and Contact.objects.filter(pk=path).exists(): logger.debug("Link to a contact is valid.") mark_valid(url) return url.status