diff --git a/models/acc_operation.py b/models/acc_operation.py index 61f41cff512b6a26e98fe620f584427c597ceb65..0a29e9379ebd52ab1ba6350e0079f3587317eec0 100644 --- a/models/acc_operation.py +++ b/models/acc_operation.py @@ -145,13 +145,13 @@ class AccOperation(models.Model): step_display_curve = "hour" # Calculate delta between 2 dates delta = (end_date - start_date).days - if delta > 0 and delta < 31: + if delta > 1 and delta <= 31: step_display_curve = "day" display_hourly_curves = True - elif delta >= 31 and delta <= 365: + elif delta > 31 and delta <= 366: step = "month" step_display_curve = "month" - elif delta > 365: + elif delta > 366: step = "year" step_display_curve = "year"