Merge pull request #28574 from akhilnarang/change-filter-type

refactor: change filter from tuple to dict
This commit is contained in:
Akhil Narang 2024-11-26 11:54:30 +05:30 committed by GitHub
commit b72bc3ab2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,7 +94,7 @@ def slugs_with_web_view(_items_to_index):
for doctype in doctype_with_web_views:
if doctype.is_published_field:
fields = ["route", doctype.website_search_field]
filters = ({doctype.is_published_field: 1},)
filters = {doctype.is_published_field: 1}
if doctype.website_search_field:
docs = frappe.get_all(doctype.name, filters=filters, fields=[*fields, "title"])
for doc in docs: