Skip to content

Commit

Permalink
fix in default dates
Browse files Browse the repository at this point in the history
  • Loading branch information
RamezIssac committed Jan 10, 2021
1 parent aa5703e commit 1291b7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions slick_reporting/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ def get_end_of_this_year():

def get_start_date():
start_date = getattr(settings, 'SLICK_REPORTING_DEFAULT_START_DATE', False)
return start_date or get_start_date()
return start_date or get_first_of_this_year()


def get_end_date():
start_date = getattr(settings, 'SLICK_REPORTING_DEFAULT_END_DATE', False)
return start_date or get_start_date()
return start_date or get_end_of_this_year()


SLICK_REPORTING_DEFAULT_START_DATE = lazy(get_start_date, datetime.datetime)()
Expand Down

0 comments on commit 1291b7d

Please sign in to comment.