inspirehep / inspire-dojson

INSPIRE-specific rules to transform from MARCXML to JSON and back.
GNU General Public License v3.0
3 stars 18 forks source link

hep: correctly set citeable for publication_info #254

Closed michamos closed 5 years ago

michamos commented 5 years ago

set_citeable uses the is_citeable function from the inspire_schemas literature builder. That function checks for the existence of some keys in the publication_info to determine whether the record is citeable. However, all keys in the publication_info are always populated, but the value is None in case no value is provided. This makes is_citeable always return true if there is any publication_info.

The solution is to call it after clean_record that strips off keys with None values.

Signed-off-by: Micha Moskovic michamos@gmail.com

ammirate commented 5 years ago

Tests are failing for unused variable though