Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Fix KeyError for reports
Browse files Browse the repository at this point in the history
  • Loading branch information
valaparthvi committed Feb 17, 2020
1 parent 680314c commit ef53ea0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cfme/intelligence/reports/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,13 @@ def report_timezone(self):

@cached_property
def queued_datetime_in_title(self):
# when the timezone is changed,
# "display" key will not be available without clearing the cache
delattr(self.appliance, "rest_api")
area = self.appliance.rest_api.settings["display"]["timezone"]
try:
area = self.appliance.rest_api.settings["display"]["timezone"]
except KeyError:
area = "UTC"
return parsetime.from_american(
self.queued_datetime, self.report_timezone
).to_saved_report_title_format(area)
Expand Down

0 comments on commit ef53ea0

Please sign in to comment.