Fix bug.
This commit is contained in:
parent
f8835c49d0
commit
56dad2a1b4
|
@ -272,8 +272,13 @@ class PropertyHiresController < ApplicationController
|
||||||
recover = false
|
recover = false
|
||||||
if (session[:hire_data] rescue false)
|
if (session[:hire_data] rescue false)
|
||||||
begin
|
begin
|
||||||
hire = PHire.new({:id=>nil}.merge(session[:hire_data]))
|
if session[:hire_data][:property_id] != property.id.to_s
|
||||||
recover = true
|
session.delete(:hire_data)
|
||||||
|
hire = PHire.new(:id=>nil)
|
||||||
|
else
|
||||||
|
hire = PHire.new({:id=>nil}.merge(session[:hire_data]))
|
||||||
|
recover = true
|
||||||
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
puts e.to_s
|
puts e.to_s
|
||||||
hire = PHire.new(:id=>nil)
|
hire = PHire.new(:id=>nil)
|
||||||
|
|
Loading…
Reference in New Issue