mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Added nil check
This commit is contained in:
@@ -23,8 +23,10 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
|
|||||||
f = context[:form]
|
f = context[:form]
|
||||||
|
|
||||||
#check project level customer/vehicle ownership first
|
#check project level customer/vehicle ownership first
|
||||||
selected_customer = context[:project].customer ? context[:project].customer.id : nil
|
if context[:project]
|
||||||
selected_vehicle = context[:project].vehicle ? context[:project].vehicle.id : nil
|
selected_customer = context[:project].customer ? context[:project].customer.id : nil
|
||||||
|
selected_vehicle = context[:project].vehicle ? context[:project].vehicle.id : nil
|
||||||
|
end
|
||||||
|
|
||||||
# Check to see if there is a quickbooks user attached to the issue
|
# Check to see if there is a quickbooks user attached to the issue
|
||||||
selected_customer = context[:issue].customer ? context[:issue].customer.id : nil
|
selected_customer = context[:issue].customer ? context[:issue].customer.id : nil
|
||||||
|
|||||||
Reference in New Issue
Block a user