diff --git a/two_factor/forms.py b/two_factor/forms.py index 3c41b609d..d70b31f6e 100644 --- a/two_factor/forms.py +++ b/two_factor/forms.py @@ -170,6 +170,9 @@ def clean_device_id(self): raise forms.ValidationError(self.error_messages['invalid_device_id']) def _chosen_device(self, user): + device = super()._chosen_device(user) + if device is not None: + return device if self.device_cache: return self.device_cache else: