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

db-postgres: relationship field filterOptions returning unexpected results #6274

Closed
JPrisk opened this issue May 9, 2024 · 3 comments
Closed
Assignees
Labels
db-postgres @payloadcms/db-postgres [possible-bug] Possible bug which hasn't been reproduced yet

Comments

@JPrisk
Copy link

JPrisk commented May 9, 2024

Link to reproduction

https://github.com/JPrisk/payload/tree/postgres-relationships

Describe the Bug

This is a repeat of this issue except i've created a new reproduction because @PatrikKozak was having difficulty reproducing the issue

To Reproduce

The following steps require you to run pnpm dev _community with your PAYLOAD_DATABASE environment set for the following options:

MongoDB

  1. navigate to http://localhost:3000/admin/collections/posts
  2. navigate to the post titled "example post 2 [published]"
  3. click the "Related Posts" dropdown
  4. observe [draft] posts being filtered from the results

Postgres

  1. navigate to http://localhost:3000/admin/collections/posts/2
  2. click the "Related Posts" dropdown
  3. observe [draft] posts being included in the results

Payload Version

latest

Adapters and Plugins

db-postgres

@JPrisk JPrisk added the [possible-bug] Possible bug which hasn't been reproduced yet label May 9, 2024
@AlessioGr AlessioGr added the db-postgres @payloadcms/db-postgres label May 9, 2024
@JPrisk
Copy link
Author

JPrisk commented May 9, 2024

very likely a duplicate of #5151

@PatrikKozak
Copy link
Contributor

Hey @JPrisk - issue #5151 has been closed with this PR.

And thank you for the above reproduction! With your reproduction and using the postgres adapter, I'm observing that drafts are being filtered out.

Can you confirm with latest if you are still experiencing this?

@JPrisk
Copy link
Author

JPrisk commented May 16, 2024

Hey @PatrikKozak - thanks for releasing the fix, yes this can now be closed ✅

@JPrisk JPrisk closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
db-postgres @payloadcms/db-postgres [possible-bug] Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants