From d28096ede6e35732c3c7a30b7695db312494f37d Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Tue, 3 Jan 2023 17:32:49 +0530 Subject: [PATCH] Revert "feat: add meta image field in LMS course" This reverts commit 37e8c3ab844957ba7a7a19221e8cda1eabac2e5b. --- lms/lms/doctype/lms_course/lms_course.json | 16 ++-------------- lms/www/courses/course.py | 5 ++--- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/lms/lms/doctype/lms_course/lms_course.json b/lms/lms/doctype/lms_course/lms_course.json index 5121ef27..f2e4ce4a 100644 --- a/lms/lms/doctype/lms_course/lms_course.json +++ b/lms/lms/doctype/lms_course/lms_course.json @@ -44,9 +44,7 @@ "pricing_section", "paid_certificate", "currency", - "price_certificate", - "website_meta_section", - "meta_image" + "price_certificate" ], "fields": [ { @@ -237,16 +235,6 @@ { "fieldname": "column_break_26", "fieldtype": "Column Break" - }, - { - "fieldname": "website_meta_section", - "fieldtype": "Section Break", - "label": "Website Meta" - }, - { - "fieldname": "meta_image", - "fieldtype": "Attach Image", - "label": "Meta Image" } ], "is_published_field": "published", @@ -273,7 +261,7 @@ } ], "make_attachments_public": 1, - "modified": "2023-01-03 16:38:35.237691", + "modified": "2022-09-14 13:26:53.153822", "modified_by": "Administrator", "module": "LMS", "name": "LMS Course", diff --git a/lms/www/courses/course.py b/lms/www/courses/course.py index ec7666bb..d9404ed5 100644 --- a/lms/www/courses/course.py +++ b/lms/www/courses/course.py @@ -57,7 +57,6 @@ def set_course_context(context, course_name): "currency", "max_attempts", "duration", - "meta_image", ], as_dict=True, ) @@ -99,8 +98,8 @@ def set_course_context(context, course_name): context.is_user_interested = get_user_interest(context.course.name) context.metatags = { - "name": course.title, - "image": course.meta_image or course.image, + "title": course.title, + "image": course.image, "description": course.short_introduction, "keywords": course.title, }