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

--- Comment #165 from Marcel de Rooy <[email protected]> ---
Just hacking Koha::Library a bit to test things:

API crashes with 500:
[2023/10/24 11:46:55] [WARN] OpenAPI >>> GET api/v1/public/libraries
[{"message":"Expected string - got
null.","path":"\/body\/0\/name"},{"message":"Expected string - got
null.","path":"\/body\/1\/name"},{"message":"Expected string - got
null.","path":"\/body\/10\/name"},{"message":"Expected string - got
null.","path":"\/body\/11\/name"},{"message":"Expected string - got
null.","path":"\/body\/12\/name"},{"message":"Expected string - got
null.","path":"\/body\/2\/name"},{"message":"Expected string - got
null.","path":"\/body\/3\/name"},{"message":"Expected string - got
null.","path":"\/body\/4\/name"},{"message":"Expected string - got
null.","path":"\/body\/5\/name"},{"message":"Expected string - got
null.","path":"\/body\/6\/name"},{"message":"Expected string - got
null.","path":"\/body\/7\/name"},{"message":"Expected string - got
null.","path":"\/body\/8\/name"},{"message":"Expected string - got
null.","path":"\/body\/9\/name"}]

What did I do?

1) public_read_list (Remove country)
-        'branchcity',     'branchstate',    'branchcountry',
+        'branchcity',     'branchstate',

2) Add a not accessible condition:
+sub is_accessible { return 0; }

3) Add two fields on unredact_list
+sub unredact_list { return [ 'branchcode', 'branchcountry' ]; }

Please explain to me why the API crashes?
I would expect a record where I can see the two unredacted fields on anonymous
acces via public.

-- 
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/

Reply via email to