Version conflict

update_or_insert is from a newer version of django. gotta use .save()
This commit is contained in:
Brett Costabile 2015-11-02 22:08:32 -05:00
parent 425aef081d
commit d3d1463404

View File

@ -121,7 +121,10 @@ class Teamspeak3Manager:
if group.ts_group_id not in remote_groups.values():
TSgroup.objects.filter(ts_group_id=group.ts_group_id).delete()
for key in remote_groups:
TSgroup.objects.update_or_create(ts_group_id=remote_groups[key],ts_group_name=key)
g = TSgroup(ts_group_id=remote_groups[key],ts_group_name=key)
q = TSgroup.objects.filters(ts_group_id=g.ts_group_id)
if !q:
g.save()
@staticmethod
def add_user(username, corp_ticker):