fix for update
This commit is contained in:
parent
3bdba0772f
commit
97e0766168
|
|
@ -275,14 +275,14 @@ class PropertyHiresController < ApplicationController
|
||||||
phire_id = booking_p[:id]
|
phire_id = booking_p[:id]
|
||||||
end
|
end
|
||||||
data = check_for_availability(start_time,end_time,booking_p[:property_id], booking_p[:recurring_interval], booking_p[:recurring_end_date], time_setting_id)
|
data = check_for_availability(start_time,end_time,booking_p[:property_id], booking_p[:recurring_interval], booking_p[:recurring_end_date], time_setting_id)
|
||||||
if data["success"] == true
|
if data["success"] == true || is_admin_page
|
||||||
error_messages = property.check_require_fields(booking_p)
|
error_messages = property.check_require_fields(booking_p)
|
||||||
if error_messages.present?
|
if error_messages.present?
|
||||||
data["msg"] = error_messages
|
data["msg"] = error_messages
|
||||||
data["success"] = false
|
data["success"] = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if data["success"] == true
|
if data["success"] == true || is_admin_page
|
||||||
hire = nil
|
hire = nil
|
||||||
if phire_id
|
if phire_id
|
||||||
hire = PHire.find(phire_id) rescue nil
|
hire = PHire.find(phire_id) rescue nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue