Skip to content

ignore_missing=False does not work with OrderedDict #156

@kpsherva

Description

@kpsherva

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions