Actions
Bug #11673
closedAPI settings unquoted integer provided gives error
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1241077
Description of problem:
Settings unqouted Integer values are resulting in an error that an integer is required. Changing it to a quoted value does not give this error.
I would expect the otherway around that a quoted integer shall give an error instead.
This is also a regression compared to 6.0.8 that accepted the unqouted integer value.
- curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"setting\":{\"value\":60}}" -XPUT https://localhost/api/v2/settings/52
{
"error": {"id":52,"errors":{"value":["is invalid: must be integer"]},"full_messages":["Value is invalid: must be integer"]}
}
- curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"setting\":{\"value\":\"60\"}}" -XPUT https://localhost/api/v2/settings/52 {"created_at":"2015-07-08T08:45:44Z","default":30,"description":"Puppet interval in minutes","id":52,"name":"puppet_interval","settings_type":"integer","updated_at":"2015-07-08T09:57:12Z","value":60}
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. See curl commands above
2.
3.
Actual results:
Unqouted integer value gives error
Expected results:
Unqouted integer works
Additional info:
Updated by The Foreman Bot almost 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2666 added
- Pull request deleted (
)
Updated by Ivan Necas almost 9 years ago
- Status changed from Ready For Testing to Closed
Updated by Dominic Cleal almost 9 years ago
- Category set to Settings
- Translation missing: en.field_release set to 72
Actions