mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-31 03:50:11 -07:00
Edited newsletters.py
It wouldn't want to work without the edit.
This commit is contained in:
parent
f624908302
commit
9c4219b42e
1 changed files with 4 additions and 1 deletions
|
@ -308,7 +308,7 @@ class Newsletter(object):
|
|||
_TEMPLATE_MASTER = ''
|
||||
_TEMPLATE = ''
|
||||
|
||||
def __init__(self, config=None, email_config=None, start_date=None, end_date=None,
|
||||
def __init__(self, config=None, email_config=None, start_date=None, week_number=None, end_date=None,
|
||||
subject=None, body=None, message=None):
|
||||
self.config = self.set_config(config=config, default=self._DEFAULT_CONFIG)
|
||||
self.email_config = self.set_config(config=email_config, default=self._DEFAULT_EMAIL_CONFIG)
|
||||
|
@ -333,6 +333,9 @@ class Newsletter(object):
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
if week_number is None:
|
||||
self.week_number = arrow.now().isocalendar()[1]
|
||||
|
||||
if self.start_date is None:
|
||||
self.start_date = self.end_date.shift(days=-self.config['last_days']+1).floor('day')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue