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: Add default empty array to filter dependencies #23565

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

dayknightmare
Copy link
Contributor

@dayknightmare dayknightmare commented Apr 3, 2023

fix(filters): Add default empty array to filter

SUMMARY

Add default empty array to filter when formFilter?.dependencies and filterToEdit?.cascadeParentIds is null or undefined

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Captura de Tela 2023-04-03 às 14 25 32

After:
Captura de Tela 2023-04-03 às 14 31 20

TESTING INSTRUCTIONS

  1. Go to 'dashboards'
  2. Click on '+ dashboard'
  3. Create any chart and add to dashboard
  4. Create a time range filter for the dashboard
  5. Save filters change
  6. Back to add edit filters
  7. Try to create new filter
  8. See solution

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Fixes #23564

@paulocod
Copy link

paulocod commented Apr 3, 2023

LGTM.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #23565 (1b96d8f) into master (13ffb4b) will increase coverage by 0.00%.
The diff coverage is 86.84%.

❗ Current head 1b96d8f differs from pull request most recent head f74281d. Consider uploading reports for the commit f74281d to get more accurate results

@@           Coverage Diff           @@
##           master   #23565   +/-   ##
=======================================
  Coverage   67.70%   67.71%           
=======================================
  Files        1914     1914           
  Lines       73961    73994   +33     
  Branches     8029     8033    +4     
=======================================
+ Hits        50076    50102   +26     
- Misses      21838    21842    +4     
- Partials     2047     2050    +3     
Flag Coverage Δ
javascript 53.93% <83.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/charts/api.py 85.71% <ø> (ø)
superset/constants.py 100.00% <ø> (ø)
...rset-frontend/src/profile/components/Favorites.tsx 80.00% <66.66%> (+2.22%) ⬆️
superset/models/slice.py 86.79% <80.00%> (+1.28%) ⬆️
...ontrols/AnnotationLayerControl/AnnotationLayer.jsx 74.40% <87.50%> (ø)
superset/models/helpers.py 38.65% <88.88%> (+0.48%) ⬆️
superset/charts/filters.py 88.40% <90.00%> (+0.07%) ⬆️
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 55.17% <100.00%> (ø)
superset/views/core.py 74.58% <100.00%> (+0.03%) ⬆️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix! It appears I'm quite late to the party..! 😄
image

@villebro villebro merged commit 95db6c0 into apache:master Apr 3, 2023
@eschutho
Copy link
Member

eschutho commented Jun 6, 2023

Also related: #23682

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when trying to add new filter on dashboard