Skip to content

Commit

Permalink
condense code
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Jul 15, 2021
1 parent 8bd98b6 commit 16a33ab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/mail_and_packages/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,9 +801,8 @@ def get_count(

if track is not None and get_tracking_num and count > 0:
for sdata in found:
num = get_tracking(sdata, account, track)
if not any(e in tracking for e in num):
tracking.extend(num)
tracking.extend(get_tracking(sdata, account, track))
tracking = list(dict.fromkeys(tracking))

if len(tracking) > 0:
# Use tracking numbers found for count (more accurate)
Expand Down

0 comments on commit 16a33ab

Please sign in to comment.