https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27858
--- Comment #17 from Joonas Kylmälä <[email protected]> --- (In reply to Jonathan Druart from comment #16) > What are we exactly trying to do here? > > Does it mean we are going to have one exception for each our relations/FKs? > We already have the ORM/DBI that is telling us what's happening if we are > doing that. No, here it is only needed because before saving the attribute to the DB we want to make sure the Attribute Type is marked as repeatable (if adding more than 1 instance of this attribute) so we try to fetch that Attribute Types info from the DB and if it doesn't exists the code would fail. It is done in the subroutine that is called in the store function here, _check_repeatable(). It is important to catch this because e.g. via REST API somebody might try to add attribute with non-existent attribute type. See example usage in https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118701 > Can't locate object method "type" via package "Can't call method "repeatable" > on > an undefined value at /kohadevbox/koha/Koha/Patron/Attribute.pm line 145. > " (perhaps you forgot to load "Can't call method "repeatable" on an undefined > value at /kohadevbox/koha/Koha/Patron/Attribute.pm line 145. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
