fuomag9 edited a comment on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-884816064


   > > > ```
   > > >     def get_schema_access_for_csv_upload(  # pylint: 
disable=invalid-name
   > > >         self,
   > > >     ) -> List[str]:
   > > >         allowed_databases = 
self.get_extra().get("schemas_allowed_for_csv_upload", [])
   > > >         from ast import literal_eval
   > > >         allowed_databases = literal_eval(allowed_databases)
   > > >         if hasattr(g, "user"):
   > > >             extra_allowed_databases = 
config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
   > > >                 self, g.user
   > > >             )
   > > >             allowed_databases += extra_allowed_databases
   > > >         return sorted(set(allowed_databases))
   > > > ```
   > > 
   > > 
   > > I can attest that did made indeed the error disappear and the upload work
   > 
   > Hi @fuomag9, how did you did this? i tried to recompile docker image 
changing the described function but apparently broke something because now the 
container is not starting.
   
   This is what I'd do and it builds, but it seems that the "fix" does not work 
anymore or I'm messing something up (even though I made that work some time 
ago!)
   
   1. `git clone https://github.com/apache/superset`
   1.  Substitute the `get_schema_access_for_csv_upload` function in 
./superset/models/core.py
   1. `sed -i "s_apache/superset:latest-dev_superset:localbeta_g" 
docker-compose-non-dev.yml`
   1. `sudo docker build -t superset:localbeta .`
   1. `sudo docker-compose -f docker-compose-non-dev.yml up`


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

Reply via email to