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

ignore_missing=False does not work with OrderedDict #156

Open
kpsherva opened this issue Aug 16, 2018 · 0 comments
Open

ignore_missing=False does not work with OrderedDict #156

kpsherva opened this issue Aug 16, 2018 · 0 comments

Comments

@kpsherva
Copy link
Contributor

In general for testing model.do(blob, ignore_missing=False) (f.e test_videos_video.py:33) should work to catch all fields which were missed in the analysis, and have no implemented rules, to avoid loosing data during cleaning or migration.
How to recreate:

  1. put in tests a field with no matching rule.
  2. call in tests method model.do with ignore_missing=False.
  3. GroupableOrderedDict will create key __ordered__ for the parsed XML and it will be recognised as a MARC field name later, which has no rule -> ignore_missing will raise and exception for that "missing" rule.

Temporarily solved with setting ordered=False in the GroupableOrderedDict -> (#155)
@egabancho mentioned of having similar issue in the past.

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

No branches or pull requests

1 participant