frappe / press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
https://frappe.cloud
GNU Affero General Public License v3.0
259 stars 187 forks source link

fix: api.site.get_site_plans ProgrammingError DASHBOARD-V2-3D9 #1999

Closed tanmoysrt closed 2 months ago

tanmoysrt commented 2 months ago

Sentry Issue ID - DASHBOARD-V2-3D9

In Sentry, the error has been grouped with other issues. Actual error - "/api/method/press.api.site.get_site_plans ProgrammingError"


https://github.com/frappe/press/blob/27e2972d204ef40ae045ba869c85064fbfacc9a1/press/api/site.py#L721-L728

On line 728 , in the query builder, it has a where clause to check record in plan names. In some cases, if the plan list is empty > (), this sql statement become invalid. Screenshot 2024-07-31 at 2 10 57 PM

That has been fixed in this PR with a guard clause (don't run the query if site plan list is already empty).