File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11
22# frozen_string_literal: true
3+ # rubocop:disable Discourse/NoAddReferenceOrAliasesActiveRecordMigration
34class CreateWorkflowStats < ActiveRecord ::Migration [ 7.2 ]
45 def change
56 create_table :workflow_stats do |t |
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
12module DiscourseWorkflow
23 class Stats
34
@@ -11,9 +12,9 @@ def calculate_daily_stats
1112 Workflow . all . each do |workflow |
1213 workflow . workflow_state . each do |state |
1314 stat = ::DiscourseWorkflow ::WorkflowStat . find_or_initialize_by (
14- cob_date : current_date ,
15- workflow_id : workflow . id ,
16- workflow_step_id : state . workflow_step_id
15+ cob_date : current_date ,
16+ workflow_id : workflow . id ,
17+ workflow_step_id : state . workflow_step_id
1718 )
1819 stat . count ||= 0
1920 stat . count += 1
You can’t perform that action at this time.
0 commit comments