Koha/Koha/Exceptions/Patron
Tomas Cohen Arazi d777df6b6f Bug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable
This patch introduces a Koha::Patron::Attribute->store method that does
the required check for the corresponding Koha::Patron::Attribute::Type
and raises an exception if trying to store more than one unique
attribute code/value combination, and another exception for
non-repeatable attribute types being stored while already existing on
the DB.

This patch introduces exception definitions for that purpose.

To test:
- Apply the unit tests patches
- Run:
  $ prove t/db_dependent/Koha/Patron/Attributes.t
=> FAIL: Tests fail
- Apply this patch
- Run:
  $ prove t/db_dependent/Koha/Patron/Attributes.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-31 14:36:47 +00:00
..
Attribute.pm Bug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable 2017-03-31 14:36:47 +00:00
Modification.pm Bug 17767: Make Koha::Patron::Modification handle extended attributes 2016-12-28 13:53:02 +00:00