willbarrett commented on a change in pull request #8454: Use `config[]` not
`config.get()`
URL:
https://github.com/apache/incubator-superset/pull/8454#discussion_r340337267
##########
File path: superset/views/core.py
##########
@@ -1491,7 +1487,7 @@ def get_datasource_label(ds_name: utils.DatasourceName)
-> str:
tables = [tn for tn in tables if tn.schema in valid_schemas]
views = [vn for vn in views if vn.schema in valid_schemas]
- max_items = config.get("MAX_TABLE_NAMES") or len(tables)
+ max_items = config["MAX_TABLE_NAMES"] or len(tables)
Review comment:
I think it's required because `max_items` is used as an index in a slice
later on. I may be mistaken, and would love an education if so!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]