Merge "Fix UsageEnd in CSV reports"

This commit is contained in:
Zuul 2018-01-03 10:09:28 +00:00 committed by Gerrit Code Review
commit 7be18da2a6
2 changed files with 6 additions and 1 deletions

View File

@ -95,7 +95,8 @@ class CSVMapped(csv_base.BaseCSVBackend):
"""Get the end usage of this period.
"""
if self.cached_start == self.usage_start and self.cached_end_str:
if self.cached_start == self.usage_start and self.cached_end_str \
and self.cached_end > self.cached_start:
return self.cached_end_str
else:
usage_end = self.usage_start_dt + datetime.timedelta(

View File

@ -0,0 +1,4 @@
---
fixes:
- |
The value of the UsageEnd field in CSV reports has been fixed.