Skip to content

Commit

Permalink
Add link type metadata to returned links (#8535)
Browse files Browse the repository at this point in the history
  • Loading branch information
marthamareal authored Dec 21, 2021
1 parent b82208b commit e7d3115
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion geonode/base/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def to_representation(self, instance):
'url'
]

links = Link.objects.filter(resource_id=int(obj_id), link_type__in=['OGC:WMS', 'OGC:WFS', 'OGC:WCS', 'image'])
links = Link.objects.filter(
resource_id=int(obj_id),
link_type__in=['OGC:WMS', 'OGC:WFS', 'OGC:WCS', 'image', 'metadata']
)
for lnk in links:
formatted_link = model_to_dict(lnk, fields=link_fields)
dehydrated.append(formatted_link)
Expand Down

0 comments on commit e7d3115

Please sign in to comment.