cms patch
diff --git a/erpnext/patches/may_2012/cms.py b/erpnext/patches/may_2012/cms.py
index d486fa7..a77ee31 100644
--- a/erpnext/patches/may_2012/cms.py
+++ b/erpnext/patches/may_2012/cms.py
@@ -1,9 +1,7 @@
import webnotes
def execute():
- from webnotes.model.doclist import DocList
- import os
-
- for name in webnotes.conn.sql("""select name from `tabWeb Page` where docstatus=0"""):
- print name
- DocList('Web Page', name[0]).save()
\ No newline at end of file
+ from webnotes.model.code import get_obj
+
+ # rewrite pages
+ get_obj('Website Settings').rewrite_pages()
\ No newline at end of file