Skip to content

Instantly share code, notes, and snippets.

@prescod
Created March 14, 2019 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prescod/148e0f6cbb70f29be317b4507796c763 to your computer and use it in GitHub Desktop.
Save prescod/148e0f6cbb70f29be317b4507796c763 to your computer and use it in GitHub Desktop.
Weird filter attribute missing bug
import django_filters
class Xyzzy:
myfilter = django_filters.rest_framework.ChoiceFilter()
print(myfilter)
print(Xyzzy.myfilter)
class Xyzzy(django_filters.rest_framework.FilterSet):
myfilter = django_filters.rest_framework.ChoiceFilter()
print(myfilter)
print(Xyzzy.myfilter) # this line crashes. Filter has been removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment