Skip to content

Commit

Permalink
Data Fix via control panel doesn't work (this is intended). 'Added so…
Browse files Browse the repository at this point in the history
…me code the "sourcesToFix" method to avoid errors in the front end.

Fixes #9
  • Loading branch information
Jefferson49 committed Aug 27, 2022
1 parent 00da542 commit f02e550
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RepositoryHierarchy.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ public function fixOptions(Tree $tree): string
*/
protected function sourcesToFix(Tree $tree, array $params): ?Collection
{
//If data fix is called from wrong context, return
if (!isset($this->repository_xref)) return null;

if ($params[CallNumberCategory::VAR_CATEGORY_NAME] === '' || $params[self::VAR_DATA_FIX_CATEGORY_NAME_REPLACE] === '') {
return null;
}
Expand Down

0 comments on commit f02e550

Please sign in to comment.