mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-11 21:40:17 +02:00
Moved TS3 group update
The group update was being called once for every group the user was in, but the update function itself already iterates over all the groups and only needs to be called once per user. I've moved the execution out of the group iteration so it only gets called once.
This commit is contained in:
parent
b76bc2729c
commit
0c4694d123
@ -118,6 +118,9 @@ def add_to_databases(user, groups, syncgroups):
|
||||
if authserviceinfo:
|
||||
authserviceinfo = AuthServicesInfo.objects.get(user=user)
|
||||
|
||||
if authserviceinfo.teamspeak3_uid and authserviceinfo.teamspeak3_uid != "":
|
||||
update_teamspeak3_groups(user)
|
||||
|
||||
for group in groups:
|
||||
print group
|
||||
|
||||
@ -137,8 +140,6 @@ def add_to_databases(user, groups, syncgroups):
|
||||
if syncgroups.filter(groupname=group.name).filter(servicename="ipboard").exists() is not True:
|
||||
create_syncgroup_for_user(user, group.name, "ipboard")
|
||||
update_ipboard_groups(user)
|
||||
if authserviceinfo.teamspeak3_uid and authserviceinfo.teamspeak3_uid != "":
|
||||
update_teamspeak3_groups(user)
|
||||
|
||||
|
||||
def remove_from_databases(user, groups, syncgroups):
|
||||
|
Loading…
x
Reference in New Issue
Block a user