Skip to content

Content importer does not deal correctly with unresolvable references and omits further (necessary processing steps) #138

@zopyx

Description

@zopyx

We have content-types that contains a RelationChoice field with a value like

related_url': '/community/meinung/onlineangebote-lehramtsstudium'

The referenced object has not been imported yet. So this reference is not resolvable. For this reason, the deserializer throws an error

> /Users/ajung/src/plone6.buildout/src/collective.exportimport/src/collective/exportimport/import_content.py(366)import_new_content()
-> new = deserializer(validate_all=False, data=item)
(Pdb) 
zExceptions.BadRequest: [{'message': 'Could not resolve object for path=/community/meinung/onlineangebote-lehramtsstudium', 'field': 'related_url', 'error': 'ValidationError'}]

and stops with the further processing on the object. E.g. the review state of this object is then not correctly set (and remains in private rather than published state).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions