Skip to content
Snippets Groups Projects
Commit 06c94717 authored by Martin Mareš's avatar Martin Mareš
Browse files

Role s kategorií "Z" platí pro všechny kategorie začínající na Z

Closes #98.
parent 377996b2
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@ class Rights:
def try_role(role: db.UserRole, at: Optional[db.Place]):
if ((at is None or role.place_id == at.place_id)
and (role.year is None or year is None or role.year == year)
and (role.category is None or cat is None or role.category == cat)
and (role.category is None or cat is None or role.category == cat or (role.category == 'Z' and cat.startswith('Z')))
and (role.seq is None or seq is None or role.seq == seq)
and (min_role is None or role_order_by_type[min_role] >= role_order_by_type[role.role])):
self.current_roles.append(role)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment