Skip to content

Commit

Permalink
Fix empty data on the first-of-the-month
Browse files Browse the repository at this point in the history
  • Loading branch information
esebesto committed Mar 22, 2024
1 parent 51ef810 commit 4947bf0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nise/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,9 @@ def _load_static_report_data(options):

end_date = attributes.get("end_date", options.get("end_date"))
generated_end_date = today()
if end_date and end_date != today().date():
if end_date and (
end_date.date() != today().date() or (isinstance(end_date, datetime.datetime) and end_date.hour != 0)
):
generated_end_date = calculate_end_date(generated_start_date, end_date)

if options.get("provider") == "azure":
Expand Down

0 comments on commit 4947bf0

Please sign in to comment.