Skip to content

Update make_response to support additional data types #20

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

cbusillo
Copy link
Contributor

@cbusillo cbusillo commented May 7, 2025

Extended the data parameter to accept bytes, bytearray, or None in addition to strings. This ensures greater flexibility and compatibility for response creation.

The parent function in werkzeug seems to support this. It seems like it might support Any, but I'm not a fan of that.

if response is None: self.response = [] elif isinstance(response, (str, bytes, bytearray)): self.set_data(response) else: self.response = response

Extended the data parameter to accept bytes, bytearray, or None in addition to strings. This ensures greater flexibility and compatibility for response creation.
@trinhanhngoc trinhanhngoc merged commit 09b25f1 into odoo-ide:18.0 May 8, 2025
@trinhanhngoc
Copy link
Member

Thank @cbusillo !

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.

2 participants