Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
remove check for plugin model attr
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Getmanskiy committed Dec 26, 2016
1 parent be519c2 commit d4d3bfe
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions djangocms_rest_api/serializers/base.py
Expand Up @@ -113,12 +113,9 @@ class Meta:
def get_plugin_data(self, obj):

plugin = obj.get_plugin_class()
model = getattr(plugin, 'model', None)
if model:
serializer = get_serializer(
obj, model=getattr(plugin, 'model', None), plugin=plugin, context=self.context)
return serializer.data
return {}
serializer = get_serializer(
obj, model=plugin.model, plugin=plugin, context=self.context)
return serializer.data

def get_inlines(self, obj):
"""
Expand Down

0 comments on commit d4d3bfe

Please sign in to comment.