• 
      

    Make LocalSite filtering in HostingServiceAccountManager conditional.

    Review Request #12398 — Created June 22, 2022 and submitted — Latest diff uploaded

    Information

    Review Board
    release-5.0.x

    Reviewers

    HostingServiceAccount.objects.accessible() no longer unconditionally
    filters by LocalSite. Most deployments don't use Local Site
    functionality, making the addition of this filter unnecessarily
    expensive in the common case.

    This change uses LocalSite.objects.has_local_sites() to determine
    whether to include the filter.

    It also removes the distinct() call, which is really not necessary for
    this query.

    Unit tests pass.

    Commits

    Files