Fixed error causing permissions to be deleted on book sort

Closes #282
This commit is contained in:
Dan Brown
2017-01-23 22:27:11 +00:00
parent 380f0f2042
commit 492e2f173e
2 changed files with 8 additions and 7 deletions

View File

@ -208,7 +208,7 @@ class BookController extends Controller
}
// Update permissions on changed models
$this->entityRepo->buildJointPermissions($updatedModels);
if (count($updatedModels) === 0) $this->entityRepo->buildJointPermissions($updatedModels);
return redirect($book->getUrl());
}