Skip to content
Snippets Groups Projects
Commit d9f51ad8 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

return default if content_terms_of_use_id is not set, fixes #3085

Closes #3085

Merge request studip/studip!2068
parent f16fc0ba
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,7 @@ class FileRef extends SchemaProvider
private function addTermsRelationship(array $relationships, \FileRef $resource)
{
$relationships[self::REL_TERMS] = [
self::RELATIONSHIP_DATA => $resource->content_terms_of_use_id ? $resource->terms_of_use : null,
self::RELATIONSHIP_DATA => $resource->terms_of_use,
self::RELATIONSHIP_LINKS_SELF => true,
];
......
......@@ -180,7 +180,7 @@ class LibraryFile extends SchemaProvider
private function addTermsRelationship(array $relationships, \FileRef $resource)
{
$relationships[self::REL_TERMS] = [
self::RELATIONSHIP_DATA => $resource->content_terms_of_use_id ? $resource->terms_of_use : null,
self::RELATIONSHIP_DATA => $resource->terms_of_use,
self::RELATIONSHIP_LINKS_SELF => true,
];
......
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