Skip to content

Commit

Permalink
Merge pull request GeoNode#6 from camptocamp/fix_api
Browse files Browse the repository at this point in the history
Add typename field only on layers
  • Loading branch information
Vampouille authored Jul 11, 2017
2 parents 5ff3cd0 + 932de15 commit 2815003
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion geonode/api/resourcebase_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class CommonModelApi(ModelResource):
'hazard_unit',
'hazard_period',
'hazard_set',
'typename',
]

def build_filters(self, filters=None):
Expand Down Expand Up @@ -586,6 +585,10 @@ class LayerResource(CommonModelApi):

"""Layer API"""

# copy parent attribute before modifying
VALUES = CommonModelApi.VALUES[:]
VALUES.append('typename')

class Meta(CommonMetaApi):
queryset = Layer.objects.distinct().order_by('-date')
if settings.RESOURCE_PUBLISHING:
Expand Down

0 comments on commit 2815003

Please sign in to comment.