Skip to content

Commit a25bc64

Browse files
author
root
committed
fix the week count bug
1 parent 5003f49 commit a25bc64

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

deploy/app/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ def decorated_function(*args, **kwargs):
1818
return decorator
1919

2020

21-
def get_week_count(at=datetime.datetime.now()):
22-
return at.isocalendar()[1]
21+
def get_week_count(at=None):
22+
if at:
23+
return at.isocalendar()[1]
24+
else:
25+
return datetime.datetime.now().isocalendar()[1]
2326

2427

2528
def get_this_monday():

0 commit comments

Comments
 (0)