[config] do not set base-url during instance creation, we don't want generated value to ends up in the configuration file stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 28 Mar 2011 18:57:34 +0200
branchstable
changeset 7130 5eb622c0c672
parent 7129 455b503fb7ff
child 7131 5893b899c21f
[config] do not set base-url during instance creation, we don't want generated value to ends up in the configuration file
web/webconfig.py
--- a/web/webconfig.py	Mon Mar 28 18:56:55 2011 +0200
+++ b/web/webconfig.py	Mon Mar 28 18:57:34 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -297,7 +297,7 @@
         baseurl = self['base-url'] or self.default_base_url()
         if baseurl and baseurl[-1] != '/':
             baseurl += '/'
-        if not self.repairing:
+        if not (self.repairing or self.creating):
             self.global_set_option('base-url', baseurl)
         httpsurl = self['https-url']
         if httpsurl: