auto: 일일 백업 2026-07-02 02:00
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -3419,6 +3419,11 @@ def _available_chart_periods() -> dict:
|
||||
y, m = date_key[:4], date_key[5:7]
|
||||
years.add(y)
|
||||
months.setdefault(y, set()).add(m)
|
||||
# 현재 연·월은 스냅샷이 아직 없어도(월초 EOD 적재 전) 드롭다운에 노출 — 지정기간 선택 가능하게.
|
||||
_now = datetime.now(KST)
|
||||
cy, cm = _now.strftime('%Y'), _now.strftime('%m')
|
||||
years.add(cy)
|
||||
months.setdefault(cy, set()).add(cm)
|
||||
return {
|
||||
'years': sorted(years, reverse=True),
|
||||
'months': {y: sorted(ms, reverse=True) for y, ms in months.items()},
|
||||
@@ -3484,8 +3489,9 @@ def _load_net_worth_series(owner: str, days: int = NET_WORTH_CHART_DAYS, unit: s
|
||||
|
||||
# 첫날이 filter 시작점에 막 들어와 1점만 잡힌 케이스 — 직전 영업일 점을 baseline으로 prepend.
|
||||
# (이번주 월요일·이번달 1일·올해 1월 1일 등에 "데이터 부족" 안내 대신 비교선이 잡히도록.)
|
||||
# filtered 가 아예 빈 경우(이번주 시작이 휴장·당일 snapshot 적재 전)에도 boundary 기준 직전 점을
|
||||
# 1개 들고 와야 caller 의 라이브 current_net 과 합쳐 2점 차트가 그려진다.
|
||||
# filtered 가 아예 빈 경우(이번주 시작이 휴장·월초 snapshot 적재 전)에도 boundary 기준 직전 점을
|
||||
# 1개만 앵커(기간 시작 기준값)로 들고 온다. 라이브 current_net 과 합쳐 2점 차트가 그려진다.
|
||||
# (2점 이상 당기면 6월 구간이 7월 차트에 그려져 오해 소지 — 앵커는 1점으로 제한.)
|
||||
if len(filtered) < 2:
|
||||
boundary = filtered[0][0] if filtered else (range_start or '9999-99-99')
|
||||
baseline = [s for s in aggregated if s[0] < boundary]
|
||||
|
||||
Reference in New Issue
Block a user