changeset 3744:da36ba4afecf

can update context var needs to be defined in __load_defaults
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 12 Apr 2013 18:01:00 +0200
parents 938e30790b89
children 7efc8dcc0dc4
files rhodecode/controllers/forks.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/forks.py	Tue Apr 09 00:40:48 2013 +0200
+++ b/rhodecode/controllers/forks.py	Fri Apr 12 18:01:00 2013 +0200
@@ -61,6 +61,7 @@
         c.repo_groups_choices = map(lambda k: unicode(k[0]), c.repo_groups)
         choices, c.landing_revs = ScmModel().get_repo_landing_revs()
         c.landing_revs_choices = choices
+        c.can_update = RhodeCodeUi.get_by_key(RhodeCodeUi.HOOK_UPDATE).ui_active
 
     def __load_data(self, repo_name=None):
         """
@@ -96,8 +97,6 @@
             c.stats_percentage = '%.2f' % ((float((last_rev)) /
                                             c.repo_last_rev) * 100)
 
-        c.can_update = RhodeCodeUi.get_by_key(RhodeCodeUi.HOOK_UPDATE).ui_active
-
         defaults = RepoModel()._get_defaults(repo_name)
         # alter the description to indicate a fork
         defaults['description'] = ('fork of repository: %s \n%s'