Skip to content

Commit a50f6ef

Browse files
committed
pkp#10263 Fix 500 error by using userGroup->roleId
1 parent 315d04e commit a50f6ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/v1/submissions/PKPSubmissionController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ public function publishPublication(Request $illuminateRequest): JsonResponse
13411341

13421342
foreach ($stageAssignments as $stageAssignment) {
13431343
$userGroup = $stageAssignment->userGroup;
1344-
if ($userGroup->getRoleId() === Role::ROLE_ID_AUTHOR) {
1344+
if ($userGroup && $userGroup->roleId === Role::ROLE_ID_AUTHOR){
13451345
$stageAssignment->canChangeMetadata = 0;
13461346
$stageAssignment->save();
13471347
}

0 commit comments

Comments
 (0)