fix: naming series

This commit is contained in:
pateljannat
2021-09-29 19:37:37 +05:30
parent ddffc8372b
commit b3840e056f
4 changed files with 8 additions and 6 deletions

View File

@@ -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()