Merge pull request #21 from darko-poljak/bugfix-sorting

Fix sorting of time entries.
This commit is contained in:
Nico Schottelius 2016-05-24 21:30:34 +02:00
commit c0eeb5a480

View file

@ -88,14 +88,8 @@ class Report(object):
@staticmethod @staticmethod
def print_report_time_entries(report_data, output_format, summary): def print_report_time_entries(report_data, output_format, summary):
''' Print time entries from report_data report using output_format. ''' Print time entries from report_data report using output_format.
If summary is True then the order of times (keys) is
sorted.
''' '''
if summary: keys = sorted(report_data.keys())
keys = sorted(report_data.keys())
else:
keys = report_data.keys()
for time in keys: for time in keys:
entries = report_data[time] entries = report_data[time]
for entry in entries: for entry in entries: