Skip to content

Commit 75ec65f

Browse files
committed
recalculate_charts: recalculate also blank presets
1 parent dac85d0 commit 75ec65f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

admin_tools_stats/management/commands/recalculate_charts.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,13 @@ def handle(self, *args, **options):
106106
time_scales = stats.allowed_time_scales
107107

108108
chart_tz = get_charts_timezone()
109-
for operation_field in stats.operation_field_name.split(","):
109+
operation_fields = stats.operation_field_name.split(",") + [""]
110+
111+
for operation_field in operation_fields:
110112
for selected_interval in time_scales:
111113
print(
112-
f"recalculating chart {stats} with {multiseries_criteria} on "
113-
f"{operation_field} criteria in {selected_interval}"
114+
f"recalculating chart '{stats}' with '{multiseries_criteria}' on "
115+
f"'{operation_field}' criteria in {selected_interval}"
114116
)
115117
time_since = datetime.now() - timedelta(
116118
days=stats.default_time_period

0 commit comments

Comments
 (0)