convert-to-sql: handle "formdef.Url-Name" objects (#6580)
This commit is contained in:
parent
d6f824c447
commit
ea77b4cdef
|
@ -111,13 +111,13 @@ class CmdConvertToSql(Command):
|
|||
print ('converting %s' % formdef.name).ljust(num_columns-1)
|
||||
sql.do_formdef_tables(formdef, rebuild_views=True)
|
||||
data_class = formdef.data_class(mode='files')
|
||||
delattr(sys.modules['formdef'], formdef.url_name.title())
|
||||
count = data_class.count()
|
||||
|
||||
# load all objects a first time, to allow the migrate() code to be
|
||||
# run and the eventual changes properly saved.
|
||||
for id in data_class.keys():
|
||||
formdata = data_class.get(id)
|
||||
delattr(sys.modules['formdef'], formdef.url_name.title())
|
||||
|
||||
# once this is done, reload and store everything in postgresql
|
||||
sql_data_class = formdef.data_class(mode='sql')
|
||||
|
|
Loading…
Reference in New Issue