more migration
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
@ -159,7 +159,7 @@ class AuthenticatorDuoStageViewSet(UsedByMixin, ModelViewSet):
|
||||
},
|
||||
status=400,
|
||||
)
|
||||
result = duo_import_devices.delay(str(stage.pk)).get()
|
||||
result = duo_import_devices.send(str(stage.pk)).get_result()
|
||||
return Response(data=result, status=200 if result["error"] == "" else 400)
|
||||
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
"""duo tasks"""
|
||||
|
||||
from dramatiq.actor import actor
|
||||
from structlog.stdlib import get_logger
|
||||
|
||||
from authentik.core.models import User
|
||||
from authentik.root.celery import CELERY_APP
|
||||
from authentik.stages.authenticator_duo.models import AuthenticatorDuoStage, DuoDevice
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
@CELERY_APP.task()
|
||||
@actor(store_results=True)
|
||||
def duo_import_devices(stage_pk: str):
|
||||
"""Import duo devices"""
|
||||
created = 0
|
||||
|
Reference in New Issue
Block a user