Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating an item in a collection via POST returns a completely different (existing) item #7113

Closed
3 tasks done
ravolta-io opened this issue Jul 31, 2021 · 1 comment
Closed
3 tasks done

Comments

@ravolta-io
Copy link

Preflight Checklist

Describe the Bug

When doing a POST to create a new item in a collection, the response is a completely different item.

I am using Axios to send the request from a React application.

  1. This is the payload I sent to the API

Schermafbeelding 2021-07-31 om 12 33 53

  1. This is the response

Schermafbeelding 2021-07-31 om 12 34 04

Judging by the property deck_name we see it's a completely different item. However, the newly created item is correctly created in the database and the correct relations are there. So it's just the response that's wrong.

To Reproduce

  1. Have a collection with some items in them
  2. Create a new item using POST via the API
  3. Log the request response
  4. See a different item is returned instead of the newly created one

What version of Directus are you using?

v9.0.0-rc.87

What version of Node.js are you using?

v12.18.3

What database are you using?

Postgres 13

What browser are you using?

Brave/Chrome

What operating system are you using?

macOS

How are you deploying Directus?

manually to DigitalOcean Droplet

@rijkvanzanten
Copy link
Member

Duplicate of #6279

@rijkvanzanten rijkvanzanten marked this as a duplicate of #6279 Jul 31, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants