1. Peter Sagerson
  2. django-otp

Pull requests

#2 Declined
Repository
malept
Branch
default
Repository
psagers
Branch
default

django_otp.device_classes: ensure there are no duplicate devices returned

Author
  1. Mark Lee
Reviewers
Description

I recently wrote a Device for my OATH Toolkit bindings for Python project, and when I run the example Django project (examples/django), the device dropdown when you verify a token contains the device twice. I traced the behavior to django_otp.device_classes. For some reason, both the django_otp and oath_toolkit.django_otp apps contain my models. This changeset makes sure there are no duplicates in the returned generator by checking against a set.

  • Learn about pull requests

Comments (2)

  1. Peter Sagerson repo owner

    If the name of your app is 'django_otp', then this might be a minor symptom of a much deeper problem. Does it go away if you give the app a unique name? I'm not really sure what Django's expected behavior is for app name collisions.