fix: check_same_allow_minute_and_raise_event 判断错误

This commit is contained in:
caoqianming 2024-03-02 09:41:47 +08:00
parent 641c4cefc6
commit 652ee31f6f
1 changed files with 3 additions and 3 deletions

View File

@ -520,9 +520,9 @@ def check_same_allow_minute_and_raise_event(cate: EventCate, employee: Employee
last_event = Event.objects.filter(
**filters).order_by('-create_time').first()
minutes = cate.same_allow_minute
if minutes > 0 and last_event and last_event.create_time + timedelta(minutes=minutes) > timezone.now():
return True
return False
if minutes > 0 and last_event and last_event.create_time + timedelta(minutes=minutes) < timezone.now():
return False
return True
def handle_xx_event(name: str, data: dict):