model_wrapper is now bean, refactoring defaults

This commit is contained in:
Rushabh Mehta
2013-02-18 18:24:28 +05:30
parent 9c880da381
commit c53231a841
104 changed files with 351 additions and 163 deletions

View File

@@ -67,13 +67,13 @@ def save_pages():
}
import webnotes
from webnotes.model.wrapper import ModelWrapper
from webnotes.model.bean import Bean
import webnotes.modules.patch_handler
for dt in query_map:
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
try:
ModelWrapper(dt, result['name'].encode('utf-8')).save()
Bean(dt, result['name'].encode('utf-8')).save()
except Exception, e:
webnotes.modules.patch_handler.log(unicode(e))