Skip to content

Commit

Permalink
Fix related data access to the full table name
Browse files Browse the repository at this point in the history
These places accidentally used only "content_access" instead of full
linking table name. Nette's magic worked this out, but this could
cause issues for installations which could create similar linking
table. Nette wouldn't be able to resolve this afterwards.
  • Loading branch information
rootpd committed Jan 27, 2023
1 parent 347502b commit 0c4d2e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Api/v1/UsersSubscriptionsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function handle(array $params): ResponseInterface
private function formatSubscription($subscription, $subscriptionType)
{
$access = [];
foreach ($subscriptionType->related('content_access')->order('content_access.sorting') as $contentAccess) {
foreach ($subscriptionType->related('subscription_type_content_access')->order('content_access.sorting') as $contentAccess) {
$access[] = $contentAccess->content_access->name;
}

Expand Down

0 comments on commit 0c4d2e1

Please sign in to comment.