Changeset - 07f63824a52d
[Not reviewed]
default
0 1 0
Søren Løvborg - 10 years ago 2016-01-05 18:50:58
sorenl@unity3d.com
admin: remove check for empty Ui table

The table is populated on database creation, and assumed to be populated
so many places in the code, we're unlikely to even reach this point if
it's empty. (E.g. web.push_ssl must be defined to push/pull/fetch both
Mercurial and Git repositories.)
1 file changed with 0 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/settings.py
Show inline comments
 
@@ -55,26 +55,24 @@ class SettingsController(BaseController)
 
    # To properly map this controller, ensure your config/routing.py
 
    # file has a resource setup:
 
    #     map.resource('setting', 'settings', controller='admin/settings',
 
    #         path_prefix='/admin', name_prefix='admin_')
 

	
 
    @LoginRequired()
 
    def __before__(self):
 
        super(SettingsController, self).__before__()
 

	
 
    def _get_hg_ui_settings(self):
 
        ret = Ui.query().all()
 

	
 
        if not ret:
 
            raise Exception('Could not get application ui settings !')
 
        settings = {}
 
        for each in ret:
 
            k = each.ui_section + '_' + each.ui_key
 
            v = each.ui_value
 
            if k == 'paths_/':
 
                k = 'paths_root_path'
 

	
 
            if k == 'web_push_ssl':
 
                v = str2bool(v)
 

	
 
            if k.find('.') != -1:
 
                k = k.replace('.', '_')
0 comments (0 inline, 0 general)