Skip to content

Commit

Permalink
Add old-style class compatible superclass call
Browse files Browse the repository at this point in the history
* DRF validators are old-style classes on python2.
  • Loading branch information
LilyFoote committed Feb 27, 2015
1 parent 1c1bf2f commit 93ef768
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion user_management/api/serializers.py
Expand Up @@ -11,7 +11,8 @@
class UniqueEmailValidator(validators.UniqueValidator):
def filter_queryset(self, value, queryset):
"""Check lower-cased email is unique."""
return super(UniqueEmailValidator, self).filter_queryset(
return validators.UniqueValidator.filter_queryset(
self,
value.lower(),
queryset,
)
Expand Down

1 comment on commit 93ef768

@meshy
Copy link
Contributor

@meshy meshy commented on 93ef768 Feb 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DRF validators are old-style classes on python2

http://media.tumblr.com/841d17660becdd6b817ccec977c45828/tumblr_inline_my9prl55qp1rrje9w.gif

Please sign in to comment.