ktmud commented on a change in pull request #16053:
URL: https://github.com/apache/superset/pull/16053#discussion_r682061016
##########
File path: superset/connectors/base/models.py
##########
@@ -308,8 +307,8 @@ def data_for_slices(self, slices: List[Slice]) -> Dict[str,
Any]:
column_names.update(
column
- for column in utils.get_iterable(form_data.get(param) or [])
- for param in COLUMN_FORM_DATA_PARAMS
+ for column_param in COLUMN_FORM_DATA_PARAMS
+ for column in utils.get_iterable(form_data.get(column_param)
or [])
Review comment:
The order of the for loop is incorrect. Normally it will throw an
undefined variable error but since `param` was used in other loops above, the
code will still run. Just another example of why too many local variables is
not a good thing.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]