Skip to content

Commit c96bb54

Browse files
committed
Make m_rdf_export more robust against missing resources.
1 parent e7e4601 commit c96bb54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/mod_ginger_rdf/models/m_rdf_export.erl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ to_rdf(Id, Context) ->
2424
%% - media.
2525
-spec to_rdf(m_rsc:resource(), [module()], z:context()) -> m_rdf:rdf_resource().
2626
to_rdf(Id, Ontologies, Context) ->
27-
Properties = m_rsc:get_visible(Id, Context),
27+
Properties = case m_rsc:get_visible(Id, Context) of
28+
undefined -> [];
29+
Props -> Props
30+
end,
2831
Edges = m_edge:get_edges(Id, Context),
2932
Types = types(proplists:get_value(category_id, Properties), Context),
3033
Triples = lists:flatten(

0 commit comments

Comments
 (0)