diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2023-09-01 14:33:05 +0200 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2023-09-01 14:33:05 +0200 |
| commit | 8c3a64f5f1c5096986ad7685c03ae4eea28eda7a (patch) | |
| tree | f47198d4dc228f37c4d675480f5fd0acc72b7748 /lib/classes/JsonApi/Schemas/Courseware | |
| parent | 185ab4a1919f137e99c72addf98790e0e5f833d2 (diff) | |
re #3128issue-3128
Diffstat (limited to 'lib/classes/JsonApi/Schemas/Courseware')
| -rw-r--r-- | lib/classes/JsonApi/Schemas/Courseware/Unit.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/classes/JsonApi/Schemas/Courseware/Unit.php b/lib/classes/JsonApi/Schemas/Courseware/Unit.php index a1c554e..7a0bf4e 100644 --- a/lib/classes/JsonApi/Schemas/Courseware/Unit.php +++ b/lib/classes/JsonApi/Schemas/Courseware/Unit.php @@ -53,7 +53,7 @@ class Unit extends SchemaProvider ] : [self::RELATIONSHIP_DATA => null]; - $relationships[self::REL_STRUCTURAL_ELEMENT] = $resource['structural_element_id'] + $relationships[self::REL_STRUCTURAL_ELEMENT] = $resource->structural_element ? [ self::RELATIONSHIP_LINKS => [ Link::RELATED => $this->createLinkToResource($resource->structural_element), @@ -76,4 +76,4 @@ class Unit extends SchemaProvider return $relationships; } -}
\ No newline at end of file +} |
