Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
nyashaChiza committed Aug 11, 2024
1 parent 672b932 commit 1636430
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dashboard/helpers/get_user_site.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@



def get_site(user):
"""Returns the site associated with the user based on their role."""
if user.role == "Operator":
return user.operation_site
elif user.role == "Manager":
return user.managed_site
return None

0 comments on commit 1636430

Please sign in to comment.