Skip to content

Commit

Permalink
feat: [ACI-934] modify sync_templates to sync only active (#150)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrii <[email protected]>
  • Loading branch information
andrii-hantkovskyi and Andrii authored Apr 17, 2024
1 parent b6af277 commit c11a18f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions credentials/apps/badges/credly/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def fetch_badge_templates(self):
"""
Fetches the badge templates from the Credly API.
"""
return self.perform_request("get", "badge_templates/")
return self.perform_request("get", f"badge_templates/?filter=state::{CredlyBadgeTemplate.STATES.active}")

def fetch_event_information(self, event_id):
"""
Expand Down Expand Up @@ -154,8 +154,7 @@ def sync_organization_badge_templates(self, site_id):
Pull active badge templates for a given Credly Organization.
Args:
organization_id (str): UUID of the organization.
organization_id (str): UUID of the organization.
site_id (int): ID of the site.
Returns:
int | None: processed items.
Expand Down

0 comments on commit c11a18f

Please sign in to comment.