perform checks based on NavigationProperty multiplicity
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 58/100
Research direction
Start in pyodata/v2/service.py around line 489 and trace the set method for newly created entities. Check how the navigation property's multiplicity is available, then ensure values assigned through set match that multiplicity. Done means an entity-valued navigation property rejects a list while valid assignments continue to work.
Written by the indexing model from the issue text.
Description
When creating a new entity, it is possible to call the method set with an invalid value for a navigation property because the method set does not verify multiplicity of the corresponding navigation property relation ship. To put it simple, it is possible to assign a list to a navigation property which is supposed to be an entity.
More explicitly, we need to add a check for multiplicity before the following line:
https://github.com/SAP/python-pyodata/blob/master/pyodata/v2/service.py#L489
- Dominant language
- Python
- Stars
- 268
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SAP/python-pyodata
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SAP/python-pyodata#304 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
SAP/python-pyodata#108 ·
-
chore
SAP/python-pyodata#302 · 1 assignee ·
-
question
SAP/python-pyodata#294 · 1 comment · 1 assignee ·
-
bug
SAP/python-pyodata#282 · 2 comments · 1 assignee ·
All issues in SAP/python-pyodata
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·