Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccacremona committed Jan 17, 2025
1 parent d341e9d commit 45f914d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions perma_web/perma/tests/test_views_user_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ def test_can_remove_user_from_registrar(user_type, request, client, link_user):
link_user.refresh_from_db()
assert link_user.is_registrar_user()

response = submit_form(
submit_form(
client,
url=reverse('user_management_manage_single_registrar_user_remove', args=[link_user.id]),
success_url=reverse('user_management_manage_registrar_user')
Expand All @@ -1177,7 +1177,7 @@ def test_registrar_cannot_remove_unrelated_user_from_registrar(client, registrar
def test_can_remove_self_from_registrar(client, registrar_user):
client.force_login(registrar_user)

response = submit_form(
submit_form(
client,
url=reverse('user_management_manage_single_registrar_user_remove', args=[registrar_user.id]),
success_url=reverse('create_link')
Expand Down
2 changes: 1 addition & 1 deletion perma_web/perma/views/user_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def target_user_valid(self):
return False, f"{self.object} belongs to organizations that are not controlled by your registrar. You cannot make them a registrar unless they leave those organizations."

if self.object.registrar_id:
if not 'registrar' in self.get_form().changed_data:
if 'registrar' not in self.get_form().changed_data:
return False, f"{self.object} is already a registrar user for that registrar."

if len(set(org.registrar_id for org in self.object.organizations.all())) > 1:
Expand Down

0 comments on commit 45f914d

Please sign in to comment.