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)
result = PIO.lookup(postcode)
location_code = result[:location_code] if result
if LA_CHANGES.value?(location_code) && form.start_date.year < 2023
nil
else
unless LA_CHANGES.value?(location_code) && form.start_date.year < 2023
location_code
end
end

Loading…
Cancel
Save