Browse Source

refactor: use unless

pull/1397/head
natdeanlewissoftwire 3 years ago
parent
commit
2034e85653
  1. 4
      app/models/log.rb

4
app/models/log.rb

@ -158,9 +158,7 @@ private
def get_inferred_la(postcode) def get_inferred_la(postcode)
result = PIO.lookup(postcode) result = PIO.lookup(postcode)
location_code = result[:location_code] if result location_code = result[:location_code] if result
if LA_CHANGES.value?(location_code) && form.start_date.year < 2023 unless LA_CHANGES.value?(location_code) && form.start_date.year < 2023
nil
else
location_code location_code
end end
end end

Loading…
Cancel
Save