Skip to content

Commit

Permalink
#34: Update count function
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Aug 29, 2019
1 parent 98121f8 commit 7b32a1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/database_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,13 @@ def get_investigations_for_instrument_in_facility_cycle(instrument_id, facility_
return get_filtered_read_query_results(filter_handler, filters, query)


def get_investigations_for_instrument_in_facility_cycle_count(instrument_id, facility_cycle_id):
def get_investigations_for_instrument_in_facility_cycle_count(instrument_id, facility_cycle_id, filters):
"""
Given an instrument id and facility cycle id, get the count of the investigations that use the given instrument in
the given cycle
:param filters: The filters to be applied to the query
:param instrument_id: The id of the instrument
:param facility_cycle_id: the ID of the facility cycle
:return: The investigations count
"""
return len(get_investigations_for_instrument_in_facility_cycle(instrument_id, facility_cycle_id))
return len(get_investigations_for_instrument_in_facility_cycle(instrument_id, facility_cycle_id, filters))

0 comments on commit 7b32a1f

Please sign in to comment.