mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-23 20:16:40 +00:00
get_project_list builds a single-table query (no joins) with fields="*", which always selects the unique PK `name`, so distinct=True can never deduplicate any rows. It is a no-op on the result set for both engines. It is not a no-op on ordering, though: frappe.db drops the ORDER BY clause for distinct queries on Postgres (Postgres requires every ORDER BY term to appear in the select list under DISTINCT), so the website project list came back unordered on Postgres while MariaDB returned it ordered by `order_by`. Removing the redundant flag leaves the MariaDB result and order untouched and restores the same ordering on Postgres.