Skip to content

Commit

Permalink
Change the method for importing the serializers
Browse files Browse the repository at this point in the history
  • Loading branch information
tschlecht committed Dec 9, 2015
1 parent 9350acc commit 34e9ad1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rest_framework_fine_permissions/utils.py
Expand Up @@ -41,8 +41,7 @@ def get_serializer(serializer):
try:
app_label, serializer_name = serializer.split('.')
app_package = get_application(app_label)
serializer_module = __import__('%s.serializers' % app_package,
fromlist=['serializers'])
serializer_module = import_module('%s.serializers' % app_package)
serializer = getattr(serializer_module, serializer_name)
except Exception:
logger.error('Serializer %s not found' % serializer)
Expand Down

0 comments on commit 34e9ad1

Please sign in to comment.