diff --git a/history/summarizer.py b/history/summarizer.py index 269dc1a..3970968 100644 --- a/history/summarizer.py +++ b/history/summarizer.py @@ -71,7 +71,7 @@ def save(self, filename): csv_writer = csv.DictWriter(outfile, field_names) csv_writer.writerow(dict(zip(field_names, field_names))) - for row in sorted(self.rows, key=lambda row: row['date']): + for row in sorted(self.rows, key=lambda row: (row['date'] is not None, row['date'])): csv_writer.writerow(row)