forms: update URL of imported forms without testing for existing data (#8262)
This commit is contained in:
parent
f10dc8fad4
commit
762c9f36fe
|
@ -248,10 +248,11 @@ class FormDef(StorableObject):
|
|||
if not self.url_name:
|
||||
self.url_name = new_url_name
|
||||
if new_url_name != self.url_name:
|
||||
# title changed, url will be changed only if there are not yet any
|
||||
# submitted forms
|
||||
# title changed, url will be changed only if the formdef is
|
||||
# currently being imported (self.id is None) or if there are not
|
||||
# yet any submitted forms
|
||||
data_class = self.data_class()
|
||||
if data_class().count() == 0:
|
||||
if self.id is None or data_class().count() == 0:
|
||||
self.url_name = new_url_name
|
||||
self.last_modification_time = time.localtime()
|
||||
if get_request() and get_request().user:
|
||||
|
|
Loading…
Reference in New Issue