You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/07 22:26:55 UTC

[GitHub] [incubator-superset] rjurney commented on a change in pull request #7438: Fixes problem in Datasource YAML export of sorting by lists of varying types by stringifying the list

rjurney commented on a change in pull request #7438: Fixes problem in Datasource YAML export of sorting by lists of varying types by stringifying the list
URL: https://github.com/apache/incubator-superset/pull/7438#discussion_r281853279
 
 

 ##########
 File path: superset/models/helpers.py
 ##########
 @@ -212,7 +212,7 @@ def export_to_dict(self, recursive=True, include_parent_ref=False,
                             include_defaults=include_defaults,
                         ) for child in getattr(self, c)
                     ],
-                    key=lambda k: sorted(k.items()))
+                    key=lambda k: sorted(str(k.items())))
 
 Review comment:
   It seems like we want the order to be deterministic - a pretty reasonable thing to want in a data export. Sorting by id would be better.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org