View | Details | Raw Unified | Return to bug 23933
Collapse All | Expand All

(-)a/C4/AuthoritiesMarc.pm (-2 / +2 lines)
Lines 575-581 sub AddAuthority { Link Here
575
        my $marcorgcode = C4::Context->preference('MARCOrgCode');
575
        my $marcorgcode = C4::Context->preference('MARCOrgCode');
576
        if ( $userenv && $userenv->{'branch'} ) {
576
        if ( $userenv && $userenv->{'branch'} ) {
577
            $library = Koha::Libraries->find( $userenv->{'branch'} );
577
            $library = Koha::Libraries->find( $userenv->{'branch'} );
578
            $marcorgcode = $library->get_effective_marcorgcode;
578
            # userenv's library could not exist because of a trick in misc/commit_file.pl (see FIXME and set_userenv statement)
579
            $marcorgcode = $library ? $library->get_effective_marcorgcode : $marcorgcode;
579
        }
580
        }
580
		if (!$record->leader) {
581
		if (!$record->leader) {
581
			$record->leader($leader);
582
			$record->leader($leader);
582
- 

Return to bug 23933