|
@@ -30,6 +30,11 @@ class UserJoinView(APIView):
|
|
|
return HttpResponse(status=404, content='用户不存在')
|
|
|
user = user[0]
|
|
|
|
|
|
+ if user.identify == 1:
|
|
|
+ logger.error("管理员角色不能加入小组")
|
|
|
+ return HttpResponse(status=400, content='管理员不能加入小组')
|
|
|
+
|
|
|
+
|
|
|
group.users.add(user)
|
|
|
executor, action, method = get_log(request)
|
|
|
gen_log(action, "加入分组", group.name, method, executor)
|