diff --git a/talentmap_api/fsbid/filters.py b/talentmap_api/fsbid/filters.py index ff236e039..8cc017a0b 100644 --- a/talentmap_api/fsbid/filters.py +++ b/talentmap_api/fsbid/filters.py @@ -58,9 +58,7 @@ class AvailablePositionsFilter(): # Used when saving a search to determine the number of records returned def get_count(query, jwt_token): - { count: 0 } - # TODO - once using available_positions, re-enable this and close TM-1314 - #return ap_services.get_available_positions_count(query, jwt_token) + return ap_services.get_available_positions_count(query, jwt_token) class Meta: fields = "__all__" diff --git a/talentmap_api/user_profile/models.py b/talentmap_api/user_profile/models.py index 78b86954f..f7ff9110c 100644 --- a/talentmap_api/user_profile/models.py +++ b/talentmap_api/user_profile/models.py @@ -129,7 +129,7 @@ def update_count(self, created=False, jwt_token=''): filter_class = resolve_path_to_view(self.endpoint).filter_class query_params = format_filter(self.filters) if getattr(filter_class, "use_api", False): - count = filter_class.get_count(query_params, jwt_token)['count'] + count = int(filter_class.get_count(query_params, jwt_token).get('count', 0)) else: count = self.get_queryset().count()