Skip to content

Commit

Permalink
renaming update
Browse files Browse the repository at this point in the history
  • Loading branch information
MizukiTemma committed Sep 11, 2024
1 parent 96332df commit 3dd3d9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions integreat_cms/cms/views/contacts/contact_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def archive_contact(
:return: A redirection to the :class:`~integreat_cms.cms.views.contacts.contact_list_view.ContactListView`
"""
to_be_archived_contact = get_object_or_404(
Contact, id=contact_id, poi__region=request.region
Contact, id=contact_id, location__region=request.region
)
to_be_archived_contact.archive()

Expand Down Expand Up @@ -55,7 +55,7 @@ def delete_contact(
:return: A redirection to the :class:`~integreat_cms.cms.views.contacts.contact_list_view.ContactListView`
"""
to_be_deleted_contact = get_object_or_404(
Contact, id=contact_id, poi__region=request.region
Contact, id=contact_id, location__region=request.region
)
to_be_deleted_contact.delete()
messages.success(
Expand All @@ -82,7 +82,7 @@ def restore_contact(
:return: A redirection to the :class:`~integreat_cms.cms.views.contacts.contact_list_view.ContactListView`
"""
to_be_restored_contact = get_object_or_404(
Contact, id=contact_id, poi__region=request.region
Contact, id=contact_id, location__region=request.region
)
to_be_restored_contact.restore()

Expand Down Expand Up @@ -112,7 +112,7 @@ def copy_contact(
:return: A redirection to the :class:`~integreat_cms.cms.views.contacts.contact_list_view.ContactListView`
"""
to_be_copied_contact = get_object_or_404(
Contact, id=contact_id, poi__region=request.region
Contact, id=contact_id, location__region=request.region
)
to_be_copied_contact.copy()

Expand Down

0 comments on commit 3dd3d9e

Please sign in to comment.