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(filterbox): fixed runtime exception in filterbox for allow multiple selection false #7011

Merged

Conversation

jitendra-kumawat
Copy link
Contributor

@jitendra-kumawat jitendra-kumawat commented Mar 12, 2019

Screenshot 2019-03-01 at 9 33 25 AM

Exception message 
2019-03-11 09:48:21,130:ERROR:root:object of type 'int' has no len()
Traceback (most recent call last):
  File "//projects/open-source/incubator-superset/superset/views/base.py", line 113, in wraps
    return f(self, *args, **kwargs)
  File "/projects/open-source/incubator-superset/superset/views/core.py", line 1251, in explore_json
    samples=samples,
  File "/projects/open-source/incubator-superset/superset/views/core.py", line 1182, in generate_json
    payload = viz_obj.get_payload()
  File "/projects/open-source/incubator-superset/superset/viz.py", line 387, in get_payload
    payload = self.get_df_payload(query_obj)
  File "/projects/open-source/incubator-superset/superset/viz.py", line 402, in get_df_payload
    query_obj = self.query_obj()
  File "/projects/open-source/incubator-superset/superset/viz.py", line 543, in query_obj
    d = super(TableViz, self).query_obj()
  File "/projects/open-source/incubator-superset/superset/viz.py", line 276, in query_obj
    self.process_query_filters()
  File "/projects/open-source/incubator-superset/superset/viz.py", line 270, in process_query_filters
    merge_extra_filters(self.form_data)
  File "/projects/open-source/incubator-superset/superset/utils/core.py", line 811, in merge_extra_filters
    elif filtr['val'] and len(filtr['val']):
TypeError: object of type 'int' has no len()

@codecov-io
Copy link

codecov-io commented Mar 12, 2019

Codecov Report

Merging #7011 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7011   +/-   ##
=======================================
  Coverage   64.46%   64.46%           
=======================================
  Files         421      421           
  Lines       20521    20521           
  Branches     2245     2245           
=======================================
  Hits        13229    13229           
  Misses       7165     7165           
  Partials      127      127
Impacted Files Coverage Δ
superset/utils/core.py 88.35% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83b5dcc...eedc1df. Read the comment docs.

@mistercrunch
Copy link
Member

mistercrunch commented Mar 12, 2019

Did a bit of archeology, for reference, this line got added a long time back:
https://github.com/apache/incubator-superset/pull/3668/files#diff-0da28640c22d45c00960bc6d8a4c3483R699

This must be related to Filter Box that don't Allow Multiple:
#6523

All in all, LGTM, it appears the code following what is altered here is assuming the input may or may not be a list

Leaving the PR open so others can intercepts, otherwise will merge in a few days.

@kristw kristw added the !deprecated-label:bug Deprecated label - Use #bug instead label Mar 13, 2019
@jitendra-kumawat
Copy link
Contributor Author

@mistercrunch ,can we merge this now.

@jitendra-kumawat
Copy link
Contributor Author

@mistercrunch did you get time to see this PR. Please share your comments.

@stale
Copy link

stale bot commented Jun 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Jun 23, 2019
@mistercrunch mistercrunch merged commit 9c0c16c into apache:master Jun 23, 2019
@jitendra-kumawat jitendra-kumawat deleted the fix/filterbox-allow-multiple-seletion branch June 25, 2019 05:25
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 19, 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 !deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants