fixed ##225 and ##226
This commit is contained in:
parent
cc692bb82c
commit
b4d648530e
|
@ -212,13 +212,16 @@ class UserController(metaclass=Singleton):
|
|||
1 if oldMonth else now.month
|
||||
endDay = 1
|
||||
debug.debug("calculate end day of month")
|
||||
lockedYear = lockedYear if lockedMonth != 12 else (lockedYear + 1)
|
||||
lockedMonth = (lockedMonth + 1) if lockedMonth != 12 else 1
|
||||
for i in range(1, 8):
|
||||
nextMonth = datetime(lockedYear, lockedMonth + 1, i)
|
||||
nextMonth = datetime(lockedYear, lockedMonth, i)
|
||||
if nextMonth.weekday() == 2:
|
||||
endDay = i
|
||||
break
|
||||
|
||||
monthLockedEndDate = datetime(lockedYear, lockedMonth + 1, endDay)
|
||||
monthLockedEndDate = datetime(
|
||||
lockedYear, lockedMonth, endDay) - timedelta(1)
|
||||
debug.debug("get lock day from database")
|
||||
retVal = db.getLockedDay(date.date())
|
||||
if not retVal:
|
||||
|
|
Loading…
Reference in New Issue