collective.exportimport icon indicating copy to clipboard operation
collective.exportimport copied to clipboard

On import DX-deserializer fails if expires is set before effective

Open fredvd opened this issue 3 years ago • 1 comments

In old Plone sites this is apparently no problem to set, but when we call the DX deserializer on an imported item where effective > expires, the import is aborted with a ValidationError:

orig_error is my local patch in plone.restapi to see the real message when I get dropped in to a PDB (PDBDebugMode)


*** zExceptions.BadRequest: [{'error': 'ValidationError', 
'message': 'error_expiration_must_be_after_effective_date', 
'orig_error': EffectiveAfterExpires('error_expiration_must_be_after_effective_date'),
'id': 'http://localhost:9050/plone/nl/kalender/asfasdfdsfasdf.pdf', 

'orig_data': {'@id': 'http://localhost:9050/plone/nl/kalender/asdfasdfsdfads.pdf', '@type': 'File', 'UID': '5397b307c9cc784319fca831cb0994d9', 'allow_discussion': False, 'contributors': [], 'created': '2015-09-07T12:40:17+00:00', 'creators': ['asdfasfdf'], 'description': None, 'effective': '2015-09-07T12:40:00+00:00', 'exclude_from_nav': True, 'expires': '2014-02-01T00:00:00+00:00',

fredvd avatar May 05 '21 20:05 fredvd