fix: check_same_allow_minute_and_raise_event 判断错误
This commit is contained in:
parent
641c4cefc6
commit
652ee31f6f
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue