HH/apps/core/utils.py
ismail c5f76b3855
Some checks are pending
Build and Push Docker Image / build (push) Waiting to run
updates
2026-05-11 14:45:30 +03:00

15 lines
336 B
Python

from apps.accounts.models import User
def get_assignable_users(hospital):
return (
User.objects.filter(
is_active=True,
hospital=hospital,
groups__name="PX Employee",
)
.select_related("department")
.distinct()
.order_by("first_name", "last_name")
)