Browse Source

CLDC-4226: add todo comment

pull/3209/head
Nat Dean-Lewis 2 months ago
parent
commit
22a3d61f4a
  1. 1
      app/models/log.rb

1
app/models/log.rb

@ -50,6 +50,7 @@ class Log < ApplicationRecord
scope :has_old_form_id, -> { where.not(old_form_id: nil) } scope :has_old_form_id, -> { where.not(old_form_id: nil) }
scope :imported_2023_with_old_form_id, -> { imported.filter_by_year(2023).has_old_form_id } scope :imported_2023_with_old_form_id, -> { imported.filter_by_year(2023).has_old_form_id }
scope :imported_2023, -> { imported.filter_by_year(2023) } scope :imported_2023, -> { imported.filter_by_year(2023) }
# TODO: CLDC-4273: use .union in filter_by_organisation rather than raw SQL
scope :filter_by_organisation, lambda { |orgs, _user = nil| scope :filter_by_organisation, lambda { |orgs, _user = nil|
owned = unscoped.where(owning_organisation: orgs).select(:id) owned = unscoped.where(owning_organisation: orgs).select(:id)
managed = unscoped.where(managing_organisation: orgs).select(:id) managed = unscoped.where(managing_organisation: orgs).select(:id)

Loading…
Cancel
Save