Skip to content

Commit

Permalink
update _chosen_device
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Dec 18, 2023
1 parent 2e4efdb commit c6de35f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions two_factor/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ def clean_device_id(self):
raise forms.ValidationError(self.error_messages['invalid_device_id'])

Check warning on line 170 in two_factor/forms.py

View check run for this annotation

Codecov / codecov/patch

two_factor/forms.py#L170

Added line #L170 was not covered by tests

def _chosen_device(self, user):
device = super()._chosen_device(user)
if device is not None:
return device

Check warning on line 175 in two_factor/forms.py

View check run for this annotation

Codecov / codecov/patch

two_factor/forms.py#L175

Added line #L175 was not covered by tests
if self.device_cache:
return self.device_cache
else:
Expand Down

0 comments on commit c6de35f

Please sign in to comment.