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 2018/09/12 04:52:48 UTC

[GitHub] mistercrunch commented on a change in pull request #5866: Fix regression around low row limit for CSV exports

mistercrunch commented on a change in pull request #5866: Fix regression around low row limit for CSV exports
URL: https://github.com/apache/incubator-superset/pull/5866#discussion_r216896320
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -2354,6 +2354,15 @@ def results(self, key):
             return json_error_response(security_manager.get_table_access_error_msg(
                 '{}'.format(rejected_tables)), status=403)
 
+        payload = utils.zlib_decompress_to_string(blob)
+        display_limit = app.config.get('DISPLAY_MAX_ROW', None)
+        if display_limit:
+            payload_json = json.loads(payload)
+            payload_json['data'] = payload_json['data'][:display_limit]
+        return json_success(
+            json.dumps(
+                payload_json, default=utils.json_iso_dttm_ser, ignore_nan=True))
+
         return json_success(utils.zlib_decompress_to_string(blob))
 
 Review comment:
   oopsy

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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