diff --git a/js/actions/contract_list_actions.js b/js/actions/contract_list_actions.js index 608b5df1..f48eb58f 100644 --- a/js/actions/contract_list_actions.js +++ b/js/actions/contract_list_actions.js @@ -12,8 +12,8 @@ class ContractListActions { ); } - fetchContractList() { - OwnershipFetcher.fetchContractList() + fetchContractList(isActive) { + OwnershipFetcher.fetchContractList(isActive) .then((contracts) => { this.actions.updateContractList(contracts.results); }) diff --git a/js/components/ascribe_forms/form_contract_agreement.js b/js/components/ascribe_forms/form_contract_agreement.js index d3b352c4..4079b741 100644 --- a/js/components/ascribe_forms/form_contract_agreement.js +++ b/js/components/ascribe_forms/form_contract_agreement.js @@ -35,7 +35,7 @@ let ContractAgreementForm = React.createClass({ componentDidMount() { ContractListStore.listen(this.onChange); - ContractListActions.fetchContractList(); + ContractListActions.fetchContractList({is_active: 'True'}); }, componentWillUnmount() { diff --git a/js/fetchers/ownership_fetcher.js b/js/fetchers/ownership_fetcher.js index 9b5e81f7..ee71d1f0 100644 --- a/js/fetchers/ownership_fetcher.js +++ b/js/fetchers/ownership_fetcher.js @@ -15,8 +15,8 @@ let OwnershipFetcher = { /** * Fetch the contracts of the logged-in user from the API. */ - fetchContractList(){ - return requests.get(ApiUrls.ownership_contract_list); + fetchContractList(isActive){ + return requests.get(ApiUrls.ownership_contract_list, isActive); }, fetchLoanPieceRequestList(){