collective / collective/collective.exportimport

language property exported with str and dict values

Open
#121 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
19
Forks
20
PR merge metrics
No merged PRs in 30d

Description

I have a Plone 5.2 AT site that exports most of the content with

```
"language": ""
```

and some content items as

```
"language": {
"title": "Deutsch",
"token": "de"
},
```

This leads to import errors such as

```
2022-04-18 14:24:26,230 WARNING [collective.exportimport.import_content:352][waitress-2] cannot deserialize http://nohost/eteaching/projekt/rechte/hochschulmitglieder-als-urheber: BadRequest([{'message': 'Constraint not satisfied', 'field': 'language', 'error': 'ValidationError'}])
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at collective.exportimport.import_content:352 and reproduce an import containing the two observed language representations. Trace how the language field is deserialized and validated, then verify that exported language values can be imported without the reported ValidationError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.