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: find error when modifying column names #1244

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

saravmajestic
Copy link
Collaborator

@saravmajestic saravmajestic commented Jun 26, 2024

Overview

Problem

If schema.yml has entry only for model and no columns, then getting below error

TypeError: Cannot read properties of undefined (reading 'find')

Solution

use default array if columns are not added in schema.yml

Screenshot/Demo

A picture is worth a thousand words. Please highlight the changes if applicable.

How to test

  • in schema.yml, create a model without columns
  • sync with db from doc editor
  • should not see any error

Checklist

  • I have run this code and it appears to resolve the stated issue
  • README.md updated and added information about my change

@saravmajestic saravmajestic self-assigned this Jun 26, 2024
@saravmajestic saravmajestic linked an issue Jun 26, 2024 that may be closed by this pull request
1 task
@anandgupta42
Copy link
Contributor

@saravmajestic Can you add a test for this?

@saravmajestic
Copy link
Collaborator Author

@saravmajestic Can you add a test for this?

yes, will add it

@mdesmet mdesmet merged commit d304724 into master Jun 26, 2024
7 checks passed
@mdesmet mdesmet deleted the fix/quote-find-error branch June 26, 2024 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error while syncing with db
3 participants