mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
renamed blog to blog_post and refresh issues
This commit is contained in:
@@ -9,10 +9,14 @@ class DocType:
|
||||
|
||||
def on_update(self):
|
||||
"if profile is set, then update all older blogs"
|
||||
|
||||
from website.helpers.blog import clear_blog_cache
|
||||
clear_blog_cache()
|
||||
|
||||
if self.doc.profile:
|
||||
for blog in webnotes.conn.sql_list("""select name from tabBlog where owner=%s
|
||||
for blog in webnotes.conn.sql_list("""select name from `tabBlog Post` where owner=%s
|
||||
and ifnull(blogger,'')=''""", self.doc.profile):
|
||||
b = webnotes.bean("Blog", blog)
|
||||
b = webnotes.bean("Blog Post", blog)
|
||||
b.doc.blogger = self.doc.name
|
||||
b.save()
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-03-07 16:28:19",
|
||||
"creation": "2013-03-08 11:36:52",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-03-07 16:33:37",
|
||||
"modified": "2013-03-11 14:00:37",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -73,6 +73,13 @@
|
||||
"label": "Avatar",
|
||||
"options": "attach_files:"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "posts",
|
||||
"fieldtype": "Int",
|
||||
"label": "Posts",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "file_list",
|
||||
|
||||
Reference in New Issue
Block a user