Skip to content

Fix #262 - #264

Merged
phanak-sap merged 2 commits into
SAP:masterfrom
manuelseeger:fixdeferred
Nov 30, 2023
Merged

phanak-sap merged 2 commits into
SAP:masterfrom
manuelseeger:fixdeferred

Conversation

@manuelseeger

@manuelseeger manuelseeger commented Nov 30, 2023 •

Copy link
Copy Markdown
Contributor

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.

@filak-sap filak-sap left a comment

Copy link
Copy Markdown
Contributor

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

phanak-sap commented Nov 30, 2023 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
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