Skip to content
Snippets Groups Projects
Commit 906d1393 authored by Jean-Baptiste's avatar Jean-Baptiste
Browse files

Merge branch '97-missing-container_path' into 'master'

Resolve "Missing container_path"

Closes #97

See merge request startinblox/djangoldp-packages/djangoldp!37
parents 854ef513 4ef68ba0
No related branches found
No related tags found
1 merge request!37Resolve "Missing container_path"
Pipeline #797 passed
...@@ -324,7 +324,7 @@ class LDPSerializer(HyperlinkedModelSerializer): ...@@ -324,7 +324,7 @@ class LDPSerializer(HyperlinkedModelSerializer):
def get_value(self, dictionary): def get_value(self, dictionary):
try: try:
object_list = dictionary["@graph"] object_list = dictionary["@graph"]
container_id = Model.container_path(self.parent.instance) container_id = Model.get_container_path(self.parent.instance)
obj = next(filter(lambda o: container_id in o[self.url_field_name], object_list)) obj = next(filter(lambda o: container_id in o[self.url_field_name], object_list))
item = super().get_value(obj) item = super().get_value(obj)
full_item = None full_item = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment