Browse Source

Remove debugging lines

pull/2605/head
Manny Dinssa 2 years ago
parent
commit
af062e1fb6
  1. 8
      app/models/location.rb
  2. 1
      app/models/scheme.rb

8
app/models/location.rb

@ -182,14 +182,6 @@ class Location < ApplicationRecord
end end
def status_at(date) def status_at(date)
Rails.logger.debug "Checking status at #{date} for location #{id}"
Rails.logger.debug "Discarded at: #{discarded_at}"
Rails.logger.debug "Confirmed: #{confirmed}"
Rails.logger.debug "Scheme status: #{scheme.status_at(date)}"
Rails.logger.debug "Open deactivation: #{open_deactivation&.deactivation_date}"
Rails.logger.debug "Last deactivation before: #{last_deactivation_before(date)&.reactivation_date}"
Rails.logger.debug "Start date: #{startdate}"
return :deleted if discarded_at.present? return :deleted if discarded_at.present?
return :incomplete unless confirmed return :incomplete unless confirmed
return :deactivated if scheme.owning_organisation.status_at(date) == :deactivated || return :deactivated if scheme.owning_organisation.status_at(date) == :deactivated ||

1
app/models/scheme.rb

@ -310,7 +310,6 @@ class Scheme < ApplicationRecord
end end
def has_active_locations? def has_active_locations?
# binding.pry
locations.active.exists? locations.active.exists?
end end

Loading…
Cancel
Save