Skip to content

Conversation

@doublergreer
Copy link
Contributor

No description provided.

@doublergreer doublergreer requested a review from Gonza10V December 5, 2025 09:12
@Gonza10V
Copy link
Collaborator

Gonza10V commented Dec 5, 2025

@codex can you review this PR?

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +208 to +212
plasmid_uris = request.form.get("plasmid_uris")
chassis_uri = request.form.get("chassis_uri")
machine_name = request.form.get("machine")
protocol = request.form.get("protocol")
parameters = request.form.get("params")

Choose a reason for hiding this comment

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

P1 Badge Treat plasmid_uris as a list before transformation

Here plasmid_uris is pulled from request.form.get as a single string (line 208) and then passed to generate_transformation_metadata (line 218), which iterates for uri in plasmid_uris (utils.py line 63) expecting a list. With a normal form post such as plasmid_uris=https://example.com/plasmid1, the function will iterate over each character (h, t, …) and call sbh.pull with those, resulting in immediate pull failures and a 500 response for any valid request. Parse the field to a list (e.g., getlist/JSON) before invoking the helper so the endpoint can handle real plasmid URIs.

Useful? React with 👍 / 👎.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not correct the fact that it gets a string does not means that what it gets is a list. It actually gets a list which is stored in "plasmid_uris". So the function is Ok.

Copy link
Collaborator

@Gonza10V Gonza10V left a comment

Choose a reason for hiding this comment

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

Please test this on postman as well

Comment on lines +208 to +212
plasmid_uris = request.form.get("plasmid_uris")
chassis_uri = request.form.get("chassis_uri")
machine_name = request.form.get("machine")
protocol = request.form.get("protocol")
parameters = request.form.get("params")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not correct the fact that it gets a string does not means that what it gets is a list. It actually gets a list which is stored in "plasmid_uris". So the function is Ok.

@Gonza10V Gonza10V merged commit 7687d61 into main Dec 5, 2025
1 check 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.

3 participants