Skip to content

Commit

Permalink
Point to site.owner via new schema
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldar committed Nov 26, 2024
1 parent 9fa7871 commit 658e45c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plausible/site.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ defmodule Plausible.Site do
has_one :weekly_report, Plausible.Site.WeeklyReport
has_one :monthly_report, Plausible.Site.MonthlyReport
has_one :ownership, Plausible.Site.Membership, where: [role: :owner]
has_one :owner, through: [:ownership, :user]
has_one :team_owner, through: [:team, :owner]
has_one :legacy_owner, through: [:ownership, :user]
has_one :owner, through: [:team, :owner]

# If `from_cache?` is set, the struct might be incomplete - see `Plausible.Site.Cache`.
# Use `Plausible.Repo.reload!(cached_site)` to pre-fill missing fields if
Expand Down

0 comments on commit 658e45c

Please sign in to comment.