Skip to content

Commit

Permalink
#34: Change to only filter the start dates
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Sep 6, 2019
1 parent 2d51bc0 commit e0ea0c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/database_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def _get_start_and_end_date_filters(self, instrument_id):
if investigation.ENDDATE > end_date:
end_date = investigation.ENDDATE
self.start_date_filter = WhereFilter("STARTDATE", start_date, "gte")
self.end_date_filter = WhereFilter("ENDDATE", end_date, "lte")
self.end_date_filter = WhereFilter("STARTDATE", end_date, "lte")

@staticmethod
def _get_investigations_for_instrument(instrument_id):
Expand Down Expand Up @@ -547,7 +547,7 @@ def _get_date_filters(self):
Sets the date filters to be applied to the query
"""
self.start_date_filter = WhereFilter("STARTDATE", self._get_facility_cycle()["STARTDATE"], "gte")
self.end_date_filter = WhereFilter("ENDDATE", self._get_facility_cycle()["ENDDATE"], "lte")
self.end_date_filter = WhereFilter("STARTDATE", self._get_facility_cycle()["ENDDATE"], "lte")

def _get_facility_cycle(self):
"""
Expand Down

0 comments on commit e0ea0c4

Please sign in to comment.