Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with non-numeric authorised value #1

Open
MagnusEnger opened this issue Apr 15, 2021 · 0 comments
Open

Problem with non-numeric authorised value #1

MagnusEnger opened this issue Apr 15, 2021 · 0 comments

Comments

@MagnusEnger
Copy link

MagnusEnger commented Apr 15, 2021

Kia ora!

I had a site where one of the NOT_LOAN authorised values had gotten a non-numeric authorised_value, like so:

MariaDB [koha_koha]> select * from authorised_values where category = 'NOT_LOAN';
+-----+----------+------------------+--------------------+--------------------+----------+
| id  | category | authorised_value | lib                | lib_opac           | imageurl |
+-----+----------+------------------+--------------------+--------------------+----------+
|  29 | NOT_LOAN | -1               | Beställd           | NULL               |          |
| 430 | NOT_LOAN | -2               | Läsesalslån        | Läsesalslån        |          |
|  30 | NOT_LOAN | 1                | Ej för utlån       | Ej för utlån       |          |
| 431 | NOT_LOAN | FJARR            | Fjärrlån           | Fjärrlån           |          |
+-----+----------+------------------+--------------------+--------------------+----------+

This resulted in /loan-status?libris_bibid=x? returning

<Status>Fjärrlån</Status>

for all items that were not on loan. Changing FJARR to a numeric value made the API return the expected Status = Tillgänglig.

Not sure this is something that deserves to be coded around, just wanted to record it as a clue if anyone runs into this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant