fix: 其他组织中创建的用户不要添加到默认组织了

pull/6350/head v2.10.4
xinwen 2021-06-04 17:26:34 +08:00 committed by 老广
parent 457784bf0d
commit 8f63b38a76
1 changed files with 0 additions and 7 deletions

View File

@ -167,10 +167,3 @@ def on_org_user_changed(action, instance, reverse, pk_set, **kwargs):
leaved_users = set(pk_set) - set(org.members.filter(id__in=user_pk_set).values_list('id', flat=True))
_clear_users_from_org(org, leaved_users)
@receiver(post_save, sender=User)
def on_user_create_refresh_cache(sender, instance, created, **kwargs):
if created:
default_org = Organization.default()
default_org.members.add(instance)