Skip to content

Upserting an existing records returns all fields as strings #41

@penguinpowernz

Description

@penguinpowernz

It will only display itself when you use the upsert route while specifying an ID:

This will not do it:

PUT /hvacs { installed: true, enabled: false}
---
{
  "installed": true,
  "enabled": false
}

But when you pass the ID to modify an existing:

PUT /hvacs { id: 1, installed: true, enabled: false}
---
{
  "installed": "true",
  "enabled": "false"
}

Even if the model doesn't already exist:

PUT /hvacs { id: 999, installed: true}
{
  "installed": "true",
  "id": 999
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions