stages/authenticator_duo: fix imported Duo Device not having a name
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
e14798dcdc
commit
ade2d4879c
|
@ -111,7 +111,10 @@ class AuthenticatorDuoStageViewSet(UsedByMixin, ModelViewSet):
|
|||
if device:
|
||||
return Response(data={"non_field_errors": ["device exists already"]}, status=400)
|
||||
DuoDevice.objects.create(
|
||||
duo_user_id=request.query_params.get("duo_user_id"), user=user, stage=stage
|
||||
duo_user_id=request.query_params.get("duo_user_id"),
|
||||
user=user,
|
||||
stage=stage,
|
||||
name="Imported Duo Authenticator",
|
||||
)
|
||||
return Response(status=204)
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class AuthenticatorDuoStageView(ChallengeStageView):
|
|||
self.request.session.pop(SESSION_KEY_DUO_ACTIVATION_CODE)
|
||||
if not existing_device:
|
||||
DuoDevice.objects.create(
|
||||
name="Duo Device",
|
||||
name="Duo Authenticator",
|
||||
user=self.get_pending_user(),
|
||||
duo_user_id=user_id,
|
||||
stage=stage,
|
||||
|
|
Reference in New Issue