|
|
|
|
@ -384,6 +384,7 @@ class BulkUpload::Lettings::Year2023::RowParser
|
|
|
|
|
validate :validate_no_housing_needs_questions_answered, on: :after_log |
|
|
|
|
validate :validate_reasonable_preference_homeless, on: :after_log |
|
|
|
|
validate :validate_condition_effects, on: :after_log |
|
|
|
|
validate :validate_lettings_allocation, on: :after_log |
|
|
|
|
validate :validate_if_log_already_exists, on: :after_log, if: -> { FeatureToggle.bulk_upload_duplicate_log_check_enabled? } |
|
|
|
|
|
|
|
|
|
validate :validate_owning_org_data_given, on: :after_log |
|
|
|
|
@ -669,6 +670,14 @@ private
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def validate_lettings_allocation |
|
|
|
|
if cbl.blank? && cap.blank? && chr.blank? |
|
|
|
|
errors.add(:field_116, I18n.t("validations.not_answered", question: "was the letting made under the Choice-Based Lettings (CBL)?")) |
|
|
|
|
errors.add(:field_117, I18n.t("validations.not_answered", question: "was the letting made under the Common Housing Register (CHR)?")) |
|
|
|
|
errors.add(:field_118, I18n.t("validations.not_answered", question: "was the letting made under the Common Allocation Policy (CAP)?")) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def household_no_illness? |
|
|
|
|
field_89 != 1 |
|
|
|
|
end |
|
|
|
|
|