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

fix(ui): avoid calling getTableState from join field on create #9256

Merged
merged 4 commits into from
Nov 17, 2024

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Nov 16, 2024

What?

Fixes the issue when visiting the create view with the Join Field and using postgres adapter

invalid input syntax for type integer: "NaN"

This happens because we don't have an ID yet and we send to the database:
WHERE id = NaN

How?

Avoids calling getTableState inside of RelationshipTable if there's no ID yet, as it will always lead to the same empty result. While we could avoid error directly in the database adapter, I don't think we should do that render request

Fixes #9193

@r1tsuu r1tsuu changed the title fix(ui): avoid rendering RelationshipTable on create fix(ui): avoid rendering RelationshipTable's table state on create Nov 17, 2024
@r1tsuu r1tsuu changed the title fix(ui): avoid rendering RelationshipTable's table state on create fix(ui): avoid calling getTableState from join field on create Nov 17, 2024
@DanRibbens DanRibbens merged commit ef2475d into beta Nov 17, 2024
53 checks passed
@DanRibbens DanRibbens deleted the fix/join-field-nan-error-postgres-issue branch November 17, 2024 16:32
Copy link

🚀 This is included in version v3.0.0-beta.134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

join gives typerror when there are no elements
2 participants