1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-17 11:54:22 +01:00

(bug) check object = nil

This commit is contained in:
Du Peng 2023-06-19 21:01:01 +02:00
parent 91fa1fcd85
commit 75259773d5
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ class Footprintable < ApplicationRecord
return false unless persisted?
reload
footprint_children.map(&:check_footprint).all? && !chained_element.corrupted?
footprint_children.map(&:check_footprint).all? && chained_element && !chained_element.corrupted?
end
# @return [ChainedElement]

View File

@ -14,8 +14,8 @@ if payment_schedule.operator_profile
end
end
json.main_object do
json.type payment_schedule.main_object.object_type
json.id payment_schedule.main_object.object_id
json.type payment_schedule.main_object&.object_type
json.id payment_schedule.main_object&.object_id
end
if payment_schedule.gateway_subscription
# this attribute is used to known which gateway should we interact with, in the front-end