Skip to content

POST /datasets/list with data_id returns 500 #381

Backlog

Description

@Akshats-git

Filtering the dataset list by data_id returns a 500 on a fresh install, and test_list_data_id fails on main.

Cause

if data_id:
    matching_filter.bindparams(bindparam("data_ids", expanding=True))

bindparams() returns a new clause, so this result is thrown away and the list goes to the driver as is:

TypeError: list can not be used as parameter

It worked by accident until now. PyMySQL up to 1.2.3 turned a list into (1,2,3). PyMySQL 1.2.4 (released Nov 9) doesn't, and it isn't pinned (it comes in through aiomysql).

How I checked

test_list_data_id against the test database:

  • PyMySQL 1.1.3, 1.2.0, 1.2.3: 4 passed
  • PyMySQL 1.2.4: 4 failed

CI doesn't show it yet because the image fails earlier on greenlet (#377, #380).

Fix

Assign the result, like tasks.py already does. The existing test covers it. I'll open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions