ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: дата старта для задач с дедлайном
This commit is contained in:
@@ -122,6 +122,16 @@ def get_chart_period_range(
|
||||
return period_ranges.get(date_filter, None)
|
||||
|
||||
|
||||
def set_default_issue_start_date(attrs: Dict[str, Any]) -> Dict[str, Any]:
|
||||
target_date = attrs.get("target_date")
|
||||
if attrs.get("start_date") is None and target_date is not None:
|
||||
today = timezone.localdate()
|
||||
if target_date >= today:
|
||||
attrs["start_date"] = today
|
||||
|
||||
return attrs
|
||||
|
||||
|
||||
def get_analytics_filters(
|
||||
slug: str,
|
||||
user: User,
|
||||
|
||||
Reference in New Issue
Block a user