Project

General

Profile

Actions

Bug #13670

closed

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

Added by Walden Raines almost 9 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by Marek Hulán about 8 years ago

  • Bugzilla link set to 1396551
Actions #2

Updated by Marek Hulán about 8 years ago

  • Target version set to 115
Actions #3

Updated by Marek Hulán over 7 years 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.

Actions

Also available in: Atom PDF