Skip to content

Commit

Permalink
Make m_rdf_export more robust against missing resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell committed Feb 16, 2023
1 parent 30c9830 commit a8e2840
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/mod_ginger_rdf/models/m_rdf_export.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ to_rdf(Id, Context) ->
%% - media.
-spec to_rdf(m_rsc:resource(), [module()], z:context()) -> m_rdf:rdf_resource().
to_rdf(Id, Ontologies, Context) ->
Properties = m_rsc:get_visible(Id, Context),
Properties = case m_rsc:get_visible(Id, Context) of
undefined -> [];
Props -> Props
end,
Edges = m_edge:get_edges(Id, Context),
Types = types(proplists:get_value(category_id, Properties), Context),
Triples = lists:flatten(
Expand Down

0 comments on commit a8e2840

Please sign in to comment.