mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-18 00:40:16 +02:00
11 lines
333 B
Python
11 lines
333 B
Python
from celery import shared_task
|
|
|
|
from django.contrib.auth.models import Group
|
|
|
|
|
|
@shared_task
|
|
def remove_users_not_matching_states_from_group(group_pk: int) -> None:
|
|
"""Remove users not matching defined states from related group."""
|
|
group = Group.objects.get(pk=group_pk)
|
|
group.authgroup.remove_users_not_matching_states()
|