Skip to content

Commit

Permalink
Check record year (#2932)
Browse files Browse the repository at this point in the history
  • Loading branch information
kosiakkatrina authored Feb 6, 2025
1 parent fe783e8 commit 3b65f97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/documentation_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def describe_hard_validations(client, all_validation_methods, all_helper_methods
form = FormHandler.instance.forms["current_#{log_type}"]

all_validation_methods.each do |meth|
if LogValidation.where(validation_name: meth.to_s, bulk_upload_specific: false, log_type:).exists?
Rails.logger.info("Validation #{meth} already exists")
if LogValidation.where(validation_name: meth.to_s, bulk_upload_specific: false, log_type:, collection_year: "#{form.start_date.year}/#{form.start_date.year + 1}").exists?
Rails.logger.info("Validation #{meth} already exists for #{form.start_date.year}")
next
end

Expand Down

0 comments on commit 3b65f97

Please sign in to comment.