Skip to content

Commit

Permalink
Update integreat_cms/cms/utils/internal_link_checker.py
Browse files Browse the repository at this point in the history
Co-authored-by: David Venhoff <david.venhoff@tuerantuer.org>
  • Loading branch information
charludo and david-venhoff authored Dec 12, 2024
1 parent 01d912f commit 85877d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integreat_cms/cms/utils/internal_link_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 85877d0

Please sign in to comment.