Merge branch 'master' into flake8

This commit is contained in:
mjaworski 2015-04-28 10:04:42 +02:00
commit ece4c01ada
2 changed files with 6 additions and 2 deletions

View File

@ -110,7 +110,7 @@ class PasswordResetConfirmSerializer(serializers.Serializer):
self.set_password_form = self.set_password_form_class(user=self.user,
data=attrs)
if not self.set_password_form.is_valid():
raise serializers.ValidationError(self.set_password_form.errors)
raise serializers.ValidationError(self.set_password_form.errors)
if not default_token_generator.check_token(self.user, attrs['token']):
raise ValidationError({'token': ['Invalid value']})

View File

@ -1,5 +1,9 @@
from six import string_types
from django.utils.importlib import import_module
import sys
if sys.version_info < (2, 7):
from django.utils.importlib import import_module
else:
from importlib import import_module
def import_callable(path_or_callable):