]> git.koha-community.org Git - koha.git/commit
Bug 17380: Do not use GuessAuthTypeCode in MetadataRecord::Authority
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 26 Jun 2017 11:41:56 +0000 (13:41 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 23 Oct 2017 13:56:39 +0000 (15:56 +0200)
commitf53b6ec248322706033695ef2928921d0aaa36aa
treed5eafc34b7752d8decd0d0f6e35fa4c7c78619d1
parentb4326600132bb3d87764687385cc13a19dd35c54
Bug 17380: Do not use GuessAuthTypeCode in MetadataRecord::Authority

If we got an authtypecode from the database and this value is not NULL
since the table column does not allow it, there is no need to call
GuessAuthTypeCode for empty string (read: Default framework) in the
sub get_from_authid.

Furthermore, we remove three Koha::MetadataRecord::Authority->new calls.
They are useless, since we do not pass a record. It just generates:
  No record passed at authorities/merge.pl line 96.
  Can't bless non-reference value at Koha/MetadataRecord/Authority.pm line 66.
Instead we throw an ObjectNotFound exception.

Test plan:
[1] Run t/db_dependent/Koha_Authority.t
[2] Interface will be tested in the following patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db35492c795540d6c3b10f7cba18698aeb84a816)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/MetadataRecord/Authority.pm
authorities/merge.pl