Browse Source

Bug 24001: Fix patron card template edition

Error when saving Patron card Template:
Can't bless non-reference value at
/home/vagrant/kohaclone/C4/Creators/Profile.pm line 89

This is caused by the profile dropdown offering invalid choices and is
fixed by adding a filter to limit options to creator = 'Patroncards'.
The UI already handles the case where no valid profile is avaiable.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
master
Blou 2 years ago
committed by Fridolin Somers
parent
commit
b3142cfe43
  1. 4
      patroncards/edit-template.pl

4
patroncards/edit-template.pl

@ -47,10 +47,10 @@ my $units = get_unit_values();
if ($op eq 'edit') {
$card_template = C4::Patroncards::Template->retrieve(template_id => $template_id);
$profile_list = get_all_profiles({ fields => [ qw( profile_id printer_name paper_bin ) ], filters => {template_id => [ $template_id, '' ]} } );
$profile_list = get_all_profiles({ fields => [ qw( profile_id printer_name paper_bin ) ], filters => {template_id => [ $template_id, 0 ], creator => 'Patroncards'} } );
}
elsif ($op eq 'save') {
my @params = ( profile_id => scalar $cgi->param('profile_id') || '',
my @params = ( profile_id => scalar $cgi->param('profile_id') || 0,
template_code => scalar $cgi->param('template_code'),
template_desc => scalar $cgi->param('template_desc'),
page_width => scalar $cgi->param('page_width'),

Loading…
Cancel
Save