Skip to content
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

Inconsistent labels between UI and CLI/API: "type" instead of "input_type" #1284

Closed
martin-etchart opened this issue Mar 17, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@martin-etchart
Copy link
Contributor

UI shows type in generated labels but API and CLI expect input_type as in the swagger doc.

I created the label in the UI and copied the generated JSON. Manually and with the copy button.

[
  {
    "name": "label",
    "attributes": [
      {
        "name": "attr",
        "type": "select",
        "mutable": false,
        "values": [
          "val"
        ]
      }
    ]
  }
]

Using that JSON as a string with CLI fails to create the task with 500 Server Error: Internal Server Error for url: http://localhost:8080/api/v1/tasks

python cli.py --auth admin:admin --server-host localhost --server-port 8080 create test_cli share "/data/1.jpg" "/data/2.jpg" --labels "[{\"name\": \"label\",\"attributes\": [{\"name\": \"attr\",\"type\": \"select\",\"mutable\": false,\"values\": [\"val\"]}]}]"

Changing type to input_type solves it. Even after task creation using input_type the UI shows type.

@bsekachev bsekachev self-assigned this Mar 18, 2020
@bsekachev bsekachev added the bug Something isn't working label Mar 18, 2020
@arituerto
Copy link

Hi,
In my case I receive the same error both using "type" and "input_type". It just works if I remove all the attriburtes.

@bsekachev
Copy link
Member

@arituerto

Try to use button Copy (top right corner) instead of copying by hand.

@bsekachev
Copy link
Member

Closed with PR above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants