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