Skip to content

[FIX] Use resp.get() to prevent KeyError#9

Merged
florentx merged 1 commit intotinyerp:masterfrom
daniellibonati:daniellibonati-fix-8
Sep 16, 2025
Merged

[FIX] Use resp.get() to prevent KeyError#9
florentx merged 1 commit intotinyerp:masterfrom
daniellibonati:daniellibonati-fix-8

Conversation

@daniellibonati
Copy link
Copy Markdown

Whenever a JSON RPC call returns None, the result key in the response will not exist, and therefore it will trigger a KeyError. By using get(), None is returned if the the 'result' key does not exist.

Fixes #8

Whenever a JSON RPC call returns `None`, the `result` key in the response will not exist, and therefore it will trigger a KeyError. By using get(), None is returned if the the 'result' key does not exist.

Fixes tinyerp#8
Copy link
Copy Markdown

@jjscarafia jjscarafia left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

👍

@ivantodorovich
Copy link
Copy Markdown

@florentx any chance this can get merged?

arkhan added a commit to arkhan/odooly that referenced this pull request Jan 8, 2023
Copy link
Copy Markdown
Member

@florentx florentx left a comment

Choose a reason for hiding this comment

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

LG. Thank you

@florentx florentx merged commit 2fb75f9 into tinyerp:master Sep 16, 2025
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.

JSONRPC KeyError when result is None

4 participants