Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [ACI-934] modify sync_templates to sync only active #150

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading