Skip to content

Commit

Permalink
sort cycles by start_date on property insights page (#4441)
Browse files Browse the repository at this point in the history
* sort cycles by start_date on property insights page

* implement this better!
  • Loading branch information
kflemin authored Dec 13, 2023
1 parent 1dc9013 commit 3d334cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion seed/models/compliance_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def evaluate(self):
results_by_cycles = {}
# property_datasets = {}
# figure out what kind of metric it is (energy? emission? combo? bool?)

metric = {
'energy_metric': False,
'emission_metric': False,
Expand All @@ -118,7 +119,7 @@ def evaluate(self):
'target_emission_column': None,
'emission_metric_type': self.emission_metric_type,
'filter_group': None,
'cycles': list(self.cycles.all().values('id', 'name')),
'cycles': list(self.cycles.all().order_by('start').values('id', 'name')),
'x_axis_columns': list(self.x_axis_columns.all().values('id', 'display_name'))}

if self.actual_energy_column is not None:
Expand Down

0 comments on commit 3d334cf

Please sign in to comment.