Skip to content

Commit

Permalink
revert(core,managers): keep filter group the same
Browse files Browse the repository at this point in the history
Signed-off-by: David Wallace <[email protected]>
  • Loading branch information
MyPyDavid committed Feb 14, 2025
1 parent 49c073c commit 4860e95
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions rdmo/core/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ def filter_current_site(self):

class GroupsQuerySetMixin:

def filter_group(self, users):

if not isinstance(users, (list, tuple, models.QuerySet)):
users = [users]

groups = {group for user in users for group in user.groups.all()}
def filter_group(self, user):
groups = user.groups.all()
return self.filter(models.Q(groups=None) | models.Q(groups__in=groups))


Expand Down

0 comments on commit 4860e95

Please sign in to comment.