Keep Answerd prayers in portal & sort by status descending (to keep answered prayers at bottom)

This commit is contained in:
meichthys 2025-11-16 04:17:49 +00:00
parent 036a145a6c
commit 522a101759
2 changed files with 8 additions and 2 deletions

View File

@ -8,3 +8,9 @@ from frappe.website.website_generator import WebsiteGenerator
class ChurchPrayerRequest(Document):
pass
def get_list_context(context):
"""Sort the portal list view by status descenting"""
context.order_by = "status desc"
return context

View File

@ -8,7 +8,7 @@
"anonymous": 0,
"apply_document_permissions": 0,
"button_label": "Save",
"condition_json": "[[\"Church Prayer Request\",\"status\",\"!=\",\"Answered\",false]]",
"condition_json": "[]",
"creation": "2025-09-13 22:28:01.939717",
"doc_type": "Church Prayer Request",
"docstatus": 0,
@ -56,7 +56,7 @@
"list_title": "Your Prayer Requests",
"login_required": 1,
"max_attachment_size": 0,
"modified": "2025-11-15 01:31:36.876277",
"modified": "2025-11-15 23:12:52.336695",
"modified_by": "Administrator",
"module": "Church Prayers",
"name": "prayer-request",