mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Fix a few minor issues with job execution
This commit is contained in:
@@ -63,6 +63,6 @@ def import_corp_members(api_userid, api_key, character_id):
|
||||
|
||||
@task(ignore_result=True)
|
||||
def import_corp_details(corp_id):
|
||||
corp = EVEPlayerCorporation.objects.get_or_create(id=corp_id)
|
||||
corp, created = EVEPlayerCorporation.objects.get_or_create(id=corp_id)
|
||||
corp.query_and_update_corp()
|
||||
corp.save()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from celery.decorators import task
|
||||
from eve_api.models import *
|
||||
from sso.models import ServiceAccount
|
||||
|
||||
@task()
|
||||
def update_user_access(user):
|
||||
@@ -61,6 +60,8 @@ def update_user_access(user):
|
||||
|
||||
@tasks(ignore_result=True)
|
||||
def update_service_groups(user_id):
|
||||
from sso.models import ServiceAccount
|
||||
|
||||
for service in ServiceAccount.objects.filter(user=user_id, active=True):
|
||||
api = service.api_class
|
||||
api.update_groups(service.service_uid, service.user.groups.all())
|
||||
|
||||
Reference in New Issue
Block a user