[Koha-bugs] [Bug 28031] Koha::Patron::Attribute->_check_repeatable doesn't exclude the object's ID

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 25 18:26:12 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28031

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #118793|0                           |1
        is obsolete|                            |

--- Comment #5 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 118829
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118829&action=edit
Bug 28031: Avoid wrong exception on saving updated attribute

In the case a non-repeatable attribute for a patron is being updated
(its value) the routines that check the type is repeatable should
exclude its own id from the search for things to work.

This patch solves that.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Patron/Attribute.t
=> FAIL: Tests explode! An unexpected exception is thrown!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list