Skip to content

Commit

Permalink
enable merge for group of users with no project membership
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenSpruk committed Oct 25, 2023
1 parent 5e24d36 commit b6fc967
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django_project_base/account/service/merge_users_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ def _change_user_pks(self, user, group):
qs = mdl.objects.filter(**{fld.attname: fld.to_python(usr)})
if is_project_related:
p_fld = is_project_related[0]
qs = qs.filter(**{p_fld.attname: group.project.pk})
qs = (
qs.filter(**{p_fld.attname: group.project.pk})
if getattr(group, "project", None)
else qs.filter()
)

m_items = []
if fld.many_to_one or fld.one_to_one:
Expand Down

0 comments on commit b6fc967

Please sign in to comment.