Skip to content

Commit

Permalink
Add function call
Browse files Browse the repository at this point in the history
  • Loading branch information
britneywwc committed Jan 18, 2024
1 parent 46d4f04 commit f755d81
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions webapp/shop/cred/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,7 @@ def cred_shop(**kwargs):
@shop_decorator(area="cube", permission="user", response="html")
@canonical_staff()
def cred_shop_manage(ua_contracts_api, advantage_mapper, **kwargs):
account = advantage_mapper.get_purchase_account("canonical-ua")
contracts = advantage_mapper.get_activation_key_contracts(account.id)

keys = []
for contract in contracts:
all_keys = ua_contracts_api.list_activation_keys(contract.id)
keys.extend(all_keys)

keys = get_activation_keys().json
unused_keys = []
active_keys = []
for i in range(len(keys)):
Expand Down Expand Up @@ -575,7 +568,7 @@ def cred_shop_manage(ua_contracts_api, advantage_mapper, **kwargs):
active_page_no = page

per_page = 5
all = get_page_info(all_keys, all_page_no, per_page)
all = get_page_info(keys, all_page_no, per_page)
unused = get_page_info(unused_keys, unused_page_no, per_page)
active = get_page_info(active_keys, active_page_no, per_page)

Expand Down

0 comments on commit f755d81

Please sign in to comment.