From ea1bd30a41f5659c067f97b7a82f975d18a4e14d Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Date: Fri, 28 Jul 2023 11:27:04 +0100 Subject: [PATCH] feat: add owned sales logs for clarity and use in rake task (#1814) --- app/models/organisation.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/organisation.rb b/app/models/organisation.rb index eea36f754..1c048703f 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -75,6 +75,10 @@ class Organisation < ApplicationRecord LettingsLog.filter_by_owning_organisation(absorbed_organisations + [self]) end + def owned_sales_logs + sales_logs + end + def managed_lettings_logs LettingsLog.filter_by_managing_organisation(absorbed_organisations + [self]) end