Skip to content

Commit

Permalink
Filter out additional tracking logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsuta committed Jul 4, 2023
1 parent d91e963 commit 00d5985
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion uber/models/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def differences(cls, instance):

@classmethod
def track(cls, action, instance):
from uber.models import AutomatedEmail

if action in [c.CREATED, c.UNPAID_PREREG, c.EDITED_PREREG]:
vals = {
attr: cls.repr(column, getattr(instance, attr))
Expand All @@ -144,7 +146,9 @@ def track(cls, action, instance):
data = cls.format(diff)
if len(diff) == 1 and 'badge_num' in diff and c.SHIFT_CUSTOM_BADGES:
action = c.AUTO_BADGE_SHIFT
if len(diff) < 3 and 'currently_sending' in diff:
if isinstance(instance, AutomatedEmail) and diff.startswith(("currently_sending",
"last_send_time",
"unapproved_count")):
return
elif not data:
return
Expand Down

0 comments on commit 00d5985

Please sign in to comment.