Skip to content

Enable AddProductParam test for Python #618

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 2 commits into from
Jan 9, 2023
Merged

Conversation

lucyzhang929
Copy link
Contributor

Using the workaround mentioned in this issue Azure/azure-functions-python-worker#894 to get the empty string query parameter.

@MaddyDev
Copy link
Contributor

MaddyDev commented Jan 9, 2023

There was a linting error on the file, otherwise looks good!

import azure.functions as func
from Common.product import Product

def main(req: func.HttpRequest, product: func.Out[func.SqlRow]) -> func.HttpResponse:
row = func.SqlRow(Product(req.params["productId"], req.params["name"], req.params["cost"]))
# The Python worker discards empty query parameters so use parse_qs as a workaround.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we document this somewhere or is this just temporary (is the Python worker going to change this behavior?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Waiting on the Python worker team's response on the issue Azure/azure-functions-python-worker#894

@lucyzhang929 lucyzhang929 merged commit 7da529f into main Jan 9, 2023
@lucyzhang929 lucyzhang929 deleted the luczhan/pynullparam branch January 9, 2023 20:37
PBBlox pushed a commit to PBBlox/azure-functions-sql-extension that referenced this pull request Apr 6, 2025
* enable AddProductParam test for Python

* fix linting error
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.

3 participants