[Update] 优化用户API,创建用户添加组织关系 (#2776)

pull/2785/head
八千流 6 years ago committed by 老广
parent c300f0b549
commit 03d9570895

@ -48,6 +48,9 @@ class UserViewSet(IDInCacheFilterMixin, BulkModelViewSet):
def perform_create(self, serializer):
users = serializer.save()
for user in users:
if current_org and current_org.is_real():
user.orgs.add(current_org.id)
self.send_created_signal(users)
def get_queryset(self):

Loading…
Cancel
Save