Browse Source

feat: flip feature toggle

pull/1378/head
natdeanlewissoftwire 3 years ago
parent
commit
b8ceb44d77
  1. 2
      app/models/validations/setup_validations.rb

2
app/models/validations/setup_validations.rb

@ -5,7 +5,7 @@ module Validations::SetupValidations
def validate_startdate_setup(record) def validate_startdate_setup(record)
return unless record.startdate && date_valid?("startdate", record) return unless record.startdate && date_valid?("startdate", record)
if !FeatureToggle.startdate_collection_window_validation_enabled? && !record.startdate.between?(active_collection_start_date, current_collection_end_date) if FeatureToggle.startdate_collection_window_validation_enabled? && !record.startdate.between?(active_collection_start_date, current_collection_end_date)
record.errors.add :startdate, validation_error_message record.errors.add :startdate, validation_error_message
end end
end end

Loading…
Cancel
Save