use import_callable() to correctly import classes in REST_AUTH_REGISTER_PERMISSION_CLASSES

This commit is contained in:
Mahmoud Adel 2020-08-21 01:02:09 +02:00
parent 33fbff3ea3
commit 8fa6fc59ce

View File

@ -13,5 +13,5 @@ RegisterSerializer = import_callable(serializers.get('REGISTER_SERIALIZER', Defa
def register_permission_classes(): def register_permission_classes():
permission_classes = [AllowAny, ] permission_classes = [AllowAny, ]
for klass in getattr(settings, 'REST_AUTH_REGISTER_PERMISSION_CLASSES', tuple()): for klass in getattr(settings, 'REST_AUTH_REGISTER_PERMISSION_CLASSES', tuple()):
permission_classes.append(klass) permission_classes.append(import_callable(klass))
return tuple(permission_classes) return tuple(permission_classes)