Make 0 point warnings no-op
This commit is contained in:
parent
22aa7af5c6
commit
b5ae34804d
@ -7852,6 +7852,10 @@ def parse_warning_target(target):
|
||||
return (tacc, thm)
|
||||
|
||||
def add_warning(target, amount, actor, reason, notes=None, expires=None, need_ack=False, sanctions=None):
|
||||
# make 0-point warnings no-op successfully, otherwise we add warnings when things like PART_PENALTY is 0
|
||||
if amount == 0:
|
||||
return True
|
||||
|
||||
tacc, thm = parse_warning_target(target)
|
||||
if tacc is None and thm is None:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user