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 view v1 on tables #15427

Merged
merged 5 commits into from
Jan 23, 2025
Merged

Fix view v1 on tables #15427

merged 5 commits into from
Jan 23, 2025

Conversation

adrinr
Copy link
Collaborator

@adrinr adrinr commented Jan 23, 2025

Description

Fixing broken tables for viewV1, probably broken during the typification of the data fetchers: https://github.com/Budibase/budibase/pull/15295/files

This PR fixes it, while ensuring that not extra calls are made during some initialisation of forms or similar (we had that case in the past with some changes)

Launchcontrol

Fixing tables for viewV1

Copy link

qa-wolf bot commented Jan 23, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@github-actions github-actions bot added the firestorm Data/Infra/Revenue Team label Jan 23, 2025
@adrinr adrinr requested a review from aptkingston January 23, 2025 11:27
@@ -1,5 +1,3 @@
// TODO: datasource and defitions are unions of the different implementations. At this point, the datasource does not know what type is being used, and the assignations will cause TS exceptions. Casting it "as any" for now. This should be fixed improving the type usages.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these TODOS are not needed anymore

@@ -21,7 +21,7 @@ export default class ViewFetch extends BaseDataFetch<ViewV1Datasource, Table> {

getSchema(definition: Table) {
const { datasource } = this.options
return definition?.views?.[datasource.name]?.schema
return definition?.views?.[datasource?.name]?.schema
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing errors when trying to fetch the data, as at some reactivity updates the datasource was undefined

@adrinr adrinr merged commit 9ab3255 into master Jan 23, 2025
20 checks passed
@adrinr adrinr deleted the fix/view-v1-on-tables branch January 23, 2025 13:51
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants