fix in patches
diff --git a/patches/december_2012/website_cache_refactor.py b/patches/december_2012/website_cache_refactor.py
index 5a1f22e..3c157bd 100644
--- a/patches/december_2012/website_cache_refactor.py
+++ b/patches/december_2012/website_cache_refactor.py
@@ -19,6 +19,6 @@
 		webnotes.conn.set_value("Blog", page[0], "content", m)
 
 	# delete website cache
-	webnotes.conn.commit()
 	webnotes.delete_doc("DocType", "Web Cache")
+	webnotes.conn.commit()
 	webnotes.conn.sql("""drop table if exists `tabWeb Cache`""")
\ No newline at end of file