Browse Source

Only use activity log after system init is done.

Martin Edenhofer 10 years ago
parent
commit
caaad57691

+ 3 - 0
app/models/application_model/activity_stream_base.rb

@@ -23,6 +23,9 @@ returns
     # return if we run import mode
     return if Setting.get('import_mode')
 
+    # return if we run on init mode
+    return if !Setting.get('system_init_done')
+
     role       = self.class.activity_stream_support_config[:role]
     updated_at = self.updated_at
     if force

+ 3 - 0
app/models/ticket/activity_stream_log.rb

@@ -20,6 +20,9 @@ returns
     # return if we run import mode
     return if Setting.get('import_mode')
 
+    # return if we run on init mode
+    return if !Setting.get('system_init_done')
+
     return if !self.class.activity_stream_support_config
     role = self.class.activity_stream_support_config[:role]
     ActivityStream.add(

+ 3 - 0
app/models/ticket/article/activity_stream_log.rb

@@ -20,6 +20,9 @@ returns
     # return if we run import mode
     return if Setting.get('import_mode')
 
+    # return if we run on init mode
+    return if !Setting.get('system_init_done')
+
     return if !self.class.activity_stream_support_config
     role = self.class.activity_stream_support_config[:role]
     ticket = Ticket.lookup( :id => self.ticket_id )