Bug #13670

SQL error when PUTing a numeric id to /api/v2/hosts/:id for any *_id attributes

Added by Walden Raines over 2 years ago. Updated 11 months ago.

Assigned To:-
Target version:Team Marek backlog
Difficulty: Bugzilla link:1396551
Found in release: Pull request:
Story points-
Velocity based estimate-


JSON provided:

    "architecture_id": 1


  "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.


#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 11 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.

Also available in: Atom PDF