Commit 9c07f84c authored by Tan Le's avatar Tan Le

Tighten condition on when to log audit event

There is an edge case when the parent `execute` fails and returns a user
with errors. This should be excluded from audit event logging.
parent 654a85f3
......@@ -11,7 +11,7 @@ module EE
mirror_cleanup(delete_user)
end
log_audit_event(user) if result
log_audit_event(user) if result.try(:destroyed?)
result
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment