Skip to content

Commit

Permalink
fix(headless): Don't 500 if session has no code
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Jul 4, 2024
1 parent abd73c2 commit e6e435d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion allauth/headless/account/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def post(self, request, *args, **kwargs):

def get_input_kwargs(self):
kwargs = super().get_input_kwargs()
kwargs["code"] = self.pending_login.get("code") if self.pending_login else ""
kwargs["code"] = (
self.pending_login.get("code", "") if self.pending_login else ""
)
return kwargs


Expand Down

0 comments on commit e6e435d

Please sign in to comment.