|
|
|
@ -38,7 +38,7 @@ private |
|
|
|
|
|
|
|
|
|
|
|
def merge_rent_periods(merging_organisation) |
|
|
|
def merge_rent_periods(merging_organisation) |
|
|
|
merging_organisation.rent_periods.each do |rent_period| |
|
|
|
merging_organisation.rent_periods.each do |rent_period| |
|
|
|
unless @absorbing_organisation.organisation_rent_periods.exists?(rent_period: rent_period) |
|
|
|
unless @absorbing_organisation.organisation_rent_periods.exists?(rent_period:) |
|
|
|
@absorbing_organisation.organisation_rent_periods << OrganisationRentPeriod.new(rent_period:) |
|
|
|
@absorbing_organisation.organisation_rent_periods << OrganisationRentPeriod.new(rent_period:) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|