Bug #13670
SQL error when PUTing a numeric id to /api/v2/hosts/:id for any *_id attributes
Status: | Resolved | ||
---|---|---|---|
Priority: | Normal | ||
Assigned To: | - | ||
Category: | API | ||
Target version: | Team Marek backlog | ||
Difficulty: | Bugzilla link: | 1396551 | |
Found in release: | Pull request: | ||
Story points | - | ||
Velocity based estimate | - |
Description
JSON provided:
{ "architecture_id": 1 }
Response:
{ "error": { "message": "ERROR: operator does not exist: character varying = integer\nLINE 1: ...architectures\".\"id\" = 1 OR \"architectures\".\"name\" = 1)) ORD...\n ^\nHINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.\n" } }
Ultimately, one should be able to provide the exact same JSON received from a GET on /api/v2/hosts/:id back as a PUT without errors.
History
#1
Updated by Marek Hulán over 1 year ago
- Bugzilla link set to 1396551
#2
Updated by Marek Hulán over 1 year ago
- Target version set to Team Marek backlog
#3
Updated by Marek Hulán 9 months ago
- Status changed from New to Resolved
I'm no longer able to reproduce, please reopen if you still encounter the issue with recent version of Foreman.