bug 3159: allow editing child patron that has no valid guarantor
authorGalen Charlton <galen.charlton@liblime.com>
Sat, 25 Apr 2009 00:46:36 +0000 (19:46 -0500)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 26 May 2009 19:15:17 +0000 (21:15 +0200)
commit1a5e48d250f64cc4117677f055faf4f70e753b40
treeb0d00db3af9e686c74839d797a7d11f3245b4ebc
parent8d0eed2510f3e317bf346aa581504b6b8b3490db
bug 3159: allow editing child patron that has no valid guarantor

If a patron with a child patron category is not linked
to a guarantor (or a valid one), it was not possible to edit
the child patron's record.  When attempt, no changes were saved
and the following error is recorded in the Apache error log:

memberentry.pl: DBD::mysql::st execute failed: Cannot add or
update a child row: a foreign key constraint
fails (`gmc_koha/borrowers`, CONSTRAINT `borrowers_ibfk_2`
FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) ...

This patch fixes this bug, allowing a child patron record to be
edited even if it has no guarantor.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
members/memberentry.pl