Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Only delete google auth if it exists
Uku Taht8397944a11d5
diff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.exindex 1f4f1d844e..fb9a1cedbe 100644--- a/lib/plausible_web/controllers/site_controller.ex+++ b/lib/plausible_web/controllers/site_controller.ex@@ -69,7 +69,9 @@ defmodule PlausibleWeb.SiteController doRepo.delete_all(from sm in "site_memberships", where: sm.site_id == ^site.id)Repo.delete_all(from p in "pageviews", where: p.hostname == ^site.domain)- Repo.delete!(site.google_auth)+ if site.google_auth do+ Repo.delete!(site.google_auth)+ endRepo.delete!(site)conn