From 88e827e6865730c6a8ec059def41e0cdd9d7d91a Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 30 Sep 2013 02:48:27 +0200 Subject: [PATCH] Do no destroy if no feature is enabled. --- app/models/application_model.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/application_model.rb b/app/models/application_model.rb index 50842b629..42f692a93 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -475,6 +475,7 @@ delete object activity stream, will be executed automatically =end def activity_stream_destroy + return if !@activity_stream_support_config ActivityStream.remove( self.class.to_s, self.id ) end @@ -620,6 +621,7 @@ delete object history, will be executed automatically =end def history_destroy + return if !@history_support_config History.remove( self.class.to_s, self.id ) end