Browse Source

Handles start date or void date missing (#631)

pull/632/head
Stéphane Meny 3 years ago committed by GitHub
parent
commit
d5fdba59cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/services/imports/case_logs_import_service.rb

2
app/services/imports/case_logs_import_service.rb

@ -549,6 +549,8 @@ module Imports
end end
def apply_date_consistency!(attributes) def apply_date_consistency!(attributes)
return if attributes["voiddate"].nil? || attributes["startdate"].nil?
if attributes["voiddate"] > attributes["startdate"] if attributes["voiddate"] > attributes["startdate"]
attributes.delete("voiddate") attributes.delete("voiddate")
end end

Loading…
Cancel
Save