Bug 23272: (RM followup) Fix edit action
This bug introduced a regression whereby if an authorized value has no branch limitations then the authorized value cannot be edited once it has been created. The edit page would display an error and not load. This is the second case of a simple ternary correcting the issue, but the logic of returning 'undef' from 'get_branch_limits' being called into question. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
d79fd755e4
commit
148f35963d
|
|
@ -54,7 +54,7 @@ if ($op eq 'add_form') {
|
|||
my ( @selected_branches, $category, $av );
|
||||
if ($id) {
|
||||
$av = Koha::AuthorisedValues->new->find( $id );
|
||||
@selected_branches = $av->library_limits->as_list;
|
||||
@selected_branches = $av->library_limits ? $av->library_limits->as_list : ();
|
||||
} else {
|
||||
$category = $input->param('category');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue