Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #262 #264

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Fix #262 #264

merged 2 commits into from
Nov 30, 2023

Conversation

manuelseeger
Copy link
Contributor

@manuelseeger manuelseeger commented Nov 30, 2023

Deferred nav properties were instantiated as entity proxies. With this change only expanded nav properties are instantiated.

Fixes #262

Deferred nav properties were instantiated as entity proxies.
With this change only expanded nav properties are instantiated.
Copy link
Contributor

@filak-sap filak-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Thank you for taking care of code you have changed! Really appreciated.

@phanak-sap
Copy link
Contributor

phanak-sap commented Nov 30, 2023

Hi @filak-sap, should this line be changed as well? I was not having time yet to create reproducing tests, resp finding service returning data in such format - but struck me that this part also expects that entities are returned only under 'results' key in the JSON response.

Is that line still correct? With the context of this PR and original issue #258? Or am I missing something?

entities = entities['results']

@phanak-sap phanak-sap added this to the 1.11.1 milestone Nov 30, 2023
@manuelseeger
Copy link
Contributor Author

#258 was about expanded, inline collection of entities - which do not have a wrapping results object. Regular, top-level entity collections are supposed to be wrapped in a results object in v2.

get_entities_handler() from https://github.com/SAP/python-pyodata/blob/0d5c9dabfc7e5b99837eaf7fdccc592bc344d623/pyodata/v2/service.py#L1519C9-L1519C21
should be fine as-is.

@phanak-sap
Copy link
Contributor

@manuelseeger thx for the check and confirming explanation, I see now, compared to the referenced spec from #238.

@phanak-sap phanak-sap merged commit dc649f4 into SAP:master Nov 30, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError in PyOData v1.11.0 When Executing CustomerCollection Query
3 participants