mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
fix: Content fetching for articles and videos
This commit is contained in:
@@ -31,7 +31,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getContent() {
|
getContent() {
|
||||||
return frappe.db.get_doc(this.type, this.content)
|
return lms.call('get_content', {
|
||||||
|
type: this.type,
|
||||||
|
content: this.content
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -50,7 +50,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getContent() {
|
getContent() {
|
||||||
return frappe.db.get_doc(this.type, this.content)
|
return lms.call('get_content', {
|
||||||
|
type: this.type,
|
||||||
|
content: this.content
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -281,3 +281,10 @@ def get_topics(course_name):
|
|||||||
course = frappe.get_doc('Course', course_name)
|
course = frappe.get_doc('Course', course_name)
|
||||||
topics = course.get_topics()
|
topics = course.get_topics()
|
||||||
return topics
|
return topics
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_content(type, content):
|
||||||
|
try:
|
||||||
|
return frappe.get_doc(type, content)
|
||||||
|
except:
|
||||||
|
return None
|
||||||
Reference in New Issue
Block a user