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/06 15:54:17 UTC

[GitHub] hitdemo opened a new pull request #5835: [bugfix] throw "TypeError: 'NoneType'..." when save chart to dash

hitdemo opened a new pull request #5835: [bugfix] throw "TypeError: 'NoneType'..." when save chart to dash
URL: https://github.com/apache/incubator-superset/pull/5835
 
 
   All changes in save_or_overwrite_slice:
   - fix bug
   - change text from "slice" to "chart"
   - make info localizable 
   
   ___
   
   Bug replication steps:
   1. remove Admin's "can add on DashboardModelView" permission
   2. open a chart in explore page, then click "save" -> "Add to new dashboard"
   3. a exception is thrown
   
   ```
   ../incubator-superset/superset/views/core.py", line 1409, in save_or_overwrite_slice
       _('You don\'t have the rights to ') + _('create a ') + _('dashboard'),
   TypeError: 'NoneType' object is not callable
   ```
   
   it seems that in function save_or_overwrite_slice,  lazy_gettext's alies _ is overridden by a local variable _
   ```
   def save_or_overwrite_slice
           .....
           form_data, _ = self.get_form_data()
           .....
   
           .....
           _('You don\'t have the rights to ') + _('create a ') + _('dashboard'),
           .....
   
   ```
   
   
   

----------------------------------------------------------------
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