refactor: change filter from tuple to dict

While list/dict both work and technically so does a tuple,
the original intention in #13831 seems to have been a dict.
A trailing comma got left behind, which changed it to a tuple.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-11-26 11:38:15 +05:30
parent 75ed8a8503
commit a7aa0ded2d
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

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: