fix: naming series
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "CHP.",
|
||||
"creation": "2021-05-03 05:49:08.383057",
|
||||
"autoname": "format:{####} {title}",
|
||||
"creation": "2021-05-03 05:49:08.383050",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_rename": 1,
|
||||
"autoname": "LES.",
|
||||
"creation": "2021-05-03 06:21:12.995987",
|
||||
"autoname": "format:{####} {title}",
|
||||
"creation": "2021-05-03 06:21:12.995981",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
@@ -22,7 +22,7 @@
|
||||
"fieldname": "chapter",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Chapter",
|
||||
"label": "Course Chapter",
|
||||
"options": "Course Chapter",
|
||||
"reqd": 1
|
||||
},
|
||||
|
||||
@@ -12,4 +12,4 @@ community.patches.v0_0.course_instructor_update
|
||||
execute:frappe.delete_doc("DocType", "Discussion Message")
|
||||
execute:frappe.delete_doc("DocType", "Discussion Thread")
|
||||
community.patches.v0_0.rename_chapters_and_lessons_doctype
|
||||
community.patches.v0_0.rename_chapter_and_lesson_doctype #26-09-2021
|
||||
community.patches.v0_0.rename_chapter_and_lesson_doctype #27-09-2021
|
||||
|
||||
@@ -25,8 +25,10 @@ def move_chapters():
|
||||
def move_lessons():
|
||||
docs = frappe.get_all("Lesson", fields=["*"])
|
||||
for doc in docs:
|
||||
print(frappe.db.exists("Chapter", doc.chapter))
|
||||
if frappe.db.exists("Chapter", doc.chapter):
|
||||
keys = doc
|
||||
print(doc)
|
||||
keys.update({"doctype": "Course Lesson"})
|
||||
del keys["name"]
|
||||
frappe.get_doc(keys).save()
|
||||
|
||||
Reference in New Issue
Block a user