Skip to content

Commit

Permalink
Merge pull request #12 from Jefferson49:Jefferson49/issue9
Browse files Browse the repository at this point in the history
Data Fix via control panel doesn't work (this is intended). 'Added some code the "sourcesToFix" method to avoid errors in the front end.
  • Loading branch information
Jefferson49 authored Aug 27, 2022
2 parents 00da542 + f02e550 commit 78b11bf
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 78b11bf

Please sign in to comment.