diff --git a/app/models/annotations/annotation.rb b/app/models/annotations/annotation.rb index 58bbe9cb89..e8274d62e5 100644 --- a/app/models/annotations/annotation.rb +++ b/app/models/annotations/annotation.rb @@ -17,9 +17,11 @@ def destroy dec = self.disable_es_callbacks skip_ability = self.skip_check_ability a = self.load - a.disable_es_callbacks = dec - a.skip_check_ability = skip_ability - a.destroy + unless a.nil? + a.disable_es_callbacks = dec + a.skip_check_ability = skip_ability + a.destroy + end end private