add_inspire_categories is completely broken
Closed this issue · 2 comments
michamos commented
reviewing the uses of classify_field
, I discovered this:
inspire-dojson/inspire_dojson/hep/model.py
Lines 51 to 65 in a37eaa7
It is completely broken as:
inspire_category
does not exist in the schema (inspire_categories
is the correct form);- it overwrites the output on every iteration.
I don't know if it is ever run, as it requires arxiv_eprints
to be present but inspire_categories
not to be, which should be pretty rare, and I have never seen any migration error because of this field.
It would be good to review the whole logic around categories in dojson as it's quite intricate.
jacquerie commented
Interestingly enough, that line is never called in the entire test suite: https://coveralls.io/builds/13627440/source?filename=inspire_dojson%2Fhep%2Fmodel.py#L58.