def get_facilities(self, user, filters, session): """ :param User user: :param FacilityFilters filters: :param Session session: :rtype: list[Facility] """ query = FacilityQuery(session) \ .belongs_to(user) if filters is not None: query = query.apply_filters(filters) return query.all()
def get_gsrn_numbers(self, user, filters, session): """ :param User user: :param FacilityFilters filters: :param Session session: :rtype: list[str] """ query = FacilityQuery(session) \ .belongs_to(user) if filters is not None: query = query.apply_filters(filters) return query.get_distinct_gsrn()