qwc-services / qwc-admin-gui

QWC Admin GUI
MIT License
1 stars 17 forks source link

Read Default search provider in themeConfig.json when it is used #76

Closed gwenandres closed 11 months ago

gwenandres commented 11 months ago

Hello,

With multi-tenancy we use themesConfig.json files. I notice that in theme administration interface (with Theme plugin) we didn't see the defaultSearchProviders list even if we completed it in themesConfig.json file.

In this PR if themesConfig is a file, you go in this file to read defaultSearchProviders.

Have a nice day,

Gwendoline Andres

manisandro commented 11 months ago

Hi @gwenandres

There is self.themesconfig in ThemesController, so you could do something like self.themesconfig.get('defaultSearchProviders', []) instead of re-reading the themesConfig. Doing this, the get_default_search_providers method can be removed AFAICS.

gwenandres commented 11 months ago

Hi @manisandro , you're right. Using self.themesconfig to reach defaultSearchProviders is enought.

Thanks !

manisandro commented 11 months ago

Thanks!