Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Avoid dups
Browse files Browse the repository at this point in the history
  • Loading branch information
marcserrat committed Nov 14, 2022
1 parent fd3ed3e commit 27edf43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reports/ms_cooper/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
)

TC_CACHE = {}
ASSET_ITEM = []

PRODUCTS = []

Expand Down Expand Up @@ -109,6 +110,8 @@ def process_subscription(client, subscription):
try:
if int(item["quantity"]) == 0:
continue
if subscription['id'] + '_' + item['id'] in ASSET_ITEM:
continue
output.append(
(
subscription["id"],
Expand Down Expand Up @@ -180,6 +183,7 @@ def process_subscription(client, subscription):
param_values["microsoft_tier1_mpn"],
)
)
ASSET_ITEM.append(subscription['id'] + '_' + item['id'])
except Exception as e:
print(f"Error in {subscription['id']}: {e}")
return output
Expand Down

0 comments on commit 27edf43

Please sign in to comment.