fixes in cms2 patch
This commit is contained in:
parent
665f6048f1
commit
6c3b622c00
@ -37,10 +37,11 @@ def cleanup():
|
|||||||
|
|
||||||
# delete deprecated pages
|
# delete deprecated pages
|
||||||
import webnotes.model
|
import webnotes.model
|
||||||
webnotes.model.delete_doc('Page', 'products')
|
for page in ['products', 'contact', 'blog', 'about']:
|
||||||
webnotes.model.delete_doc('Page', 'contact')
|
try:
|
||||||
webnotes.model.delete_doc('Page', 'blog')
|
webnotes.model.delete_doc('Page', page)
|
||||||
webnotes.model.delete_doc('Page', 'about')
|
except Exception, e:
|
||||||
|
webnotes.modules.patch_handler.log(str(e))
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import conf
|
import conf
|
||||||
@ -71,7 +72,7 @@ def save_pages():
|
|||||||
for dt in query_map:
|
for dt in query_map:
|
||||||
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
|
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
|
||||||
try:
|
try:
|
||||||
DocList(dt, result['name']).save()
|
DocList(dt, result['name'].encode('utf-8')).save()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
webnotes.modules.patch_handler.log(str(e))
|
webnotes.modules.patch_handler.log(str(e))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user