Skip to content

Commit

Permalink
match signature with django add_message
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 25, 2024
1 parent 682a7f9 commit fa50bdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions edc_sites/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,15 @@ def get_view_only_site_ids_for_user(
if get_change_codenames(user):
if request:
add_to_messages_once(
get_message_text(messages.ERROR), request, messages.ERROR
request,
messages.ERROR,
get_message_text(messages.ERROR),
)
else:
site_ids = [s.id for s in user.userprofile.sites.all() if s.id != site_id]
if request:
add_to_messages_once(
get_message_text(messages.WARNING), request, messages.WARNING
request, messages.WARNING, get_message_text(messages.WARNING)
)
return site_ids

Expand Down

0 comments on commit fa50bdc

Please sign in to comment.