]> git.koha-community.org Git - koha.git/commit
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)
committerGalen Charlton <galen.charlton@liblime.com>
Sat, 25 Apr 2009 00:49:05 +0000 (19:49 -0500)
commite20380854911f0cda68fead752e85fdd29959c69
treed8eb1959e2e1e8003eceec2aca3449c40cc3359f
parent1e6b61cdb1dcfbf05abf1a3cd0d5c36439e0a75c
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>
members/memberentry.pl