diff --git a/app/assets/javascripts/app/lib/spine/spine.coffee b/app/assets/javascripts/app/lib/spine/spine.coffee index 129e45bf6..fee7138f8 100644 --- a/app/assets/javascripts/app/lib/spine/spine.coffee +++ b/app/assets/javascripts/app/lib/spine/spine.coffee @@ -417,6 +417,15 @@ class Model extends Module # ID change, need to do some shifting if atts.id and @id isnt atts.id @changeID(atts.id) + + # temporary debugging of a possible race condition + if !@constructor.irecords[@id] + model = @constructor.className + atts_json = JSON.stringify(atts) + console.notice "Can't refresh not exisint %s instance with ID %s and attributes %s. Possible race condition?", model, @id, atts_json + # prevent exception + return + # go to the source and load attributes @constructor.irecords[@id].load(atts) @trigger('refresh', this)