Skip to content

Commit

Permalink
Fix element serialization for collections that aren't populated yet
Browse files Browse the repository at this point in the history
Fixes
galaxyproject#17818 (comment):
```
AttributeError
'NoneType' object has no attribute 'dataset'
```
  • Loading branch information
mvdbeek committed May 28, 2024
1 parent 316eb5b commit 0359063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/services/dataset_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def serialize_element(dsc_element) -> DCESummary:
hdca_id=self.encode_id(hdca.id),
parent_id=self.encode_id(result["object"]["id"]),
)
else:
elif result["element_type"] == DCEType.hda:
result["object"]["accessible"] = self.hda_manager.is_accessible(dsc_element.element_object, trans.user)
return result

Expand Down

0 comments on commit 0359063

Please sign in to comment.