Skip to content

Commit

Permalink
Merge pull request #249 from MetaPhase-Consulting/fix/savedsearch_count
Browse files Browse the repository at this point in the history
fix: reenable saved search counts using the fsbid api. TM-1314
  • Loading branch information
rtirserio authored Nov 26, 2019
2 parents 98ba332 + 3bca6b4 commit bbae8bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions talentmap_api/fsbid/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__"
2 changes: 1 addition & 1 deletion talentmap_api/user_profile/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit bbae8bf

Please sign in to comment.