Skip to content

Commit 8e8c56b

Browse files
authored
Update update_scoreboard.py
1 parent 6de432d commit 8e8c56b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

_MonthlyChallenges/update_scoreboard.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ def main():
4848
else:
4949
# 2-2. month 값이 다르면 현재 달로 덮어쓰기
5050
print("[Step 2.2] Checking month field...")
51-
if scoreboard["month"] != current_month:
52-
print(f"[Step 2.2] Month mismatch detected (previous: {scoreboard['month']}, current: {current_month}); archiving...")
53-
51+
if scoreboard["month"] is not None: # month가 None이 아닌 경우에만 아카이브
52+
print(f"[Step 2.2] Archiving previous month data: {scoreboard['month']}")
5453
archive_current_month()
5554
print("[Step 2.2] Archived previous month data to HISTORY.md")
56-
5755
scoreboard["month"] = None # PR 데이터에서 첫 번째 항목의 월을 사용할 것이므로 None으로 초기화
5856
scoreboard["users"] = {} # 매달 유저값도 초기화
5957
print(f"[Step 2.2] Reset scoreboard for new month: {scoreboard!r}")

0 commit comments

Comments
 (0)