mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-14 23:10:15 +02:00
Use primary key instead of user object for api_refresh
This commit is contained in:
parent
b41521bcb5
commit
d937d5b5d4
@ -71,7 +71,8 @@ def refresh_api(api):
|
||||
|
||||
|
||||
@app.task
|
||||
def refresh_user_apis(user):
|
||||
def refresh_user_apis(pk):
|
||||
user = User.objects.get(pk=pk)
|
||||
logger.debug('Refreshing all APIs belonging to user %s' % user)
|
||||
apis = EveApiKeyPair.objects.filter(user=user)
|
||||
for x in apis:
|
||||
@ -98,7 +99,7 @@ def run_api_refresh():
|
||||
return
|
||||
|
||||
for u in User.objects.all():
|
||||
refresh_user_apis.delay(u)
|
||||
refresh_user_apis.delay(u.pk)
|
||||
|
||||
|
||||
@app.task
|
||||
|
Loading…
x
Reference in New Issue
Block a user