From e30b1984182b36030c70a13a1ac1f1098802f6b9 Mon Sep 17 00:00:00 2001 From: kialam Date: Fri, 21 Dec 2018 11:56:39 -0500 Subject: [PATCH] Remove duplicate REST call in add org component. --- src/pages/Organizations/views/Organization.add.jsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/pages/Organizations/views/Organization.add.jsx b/src/pages/Organizations/views/Organization.add.jsx index 5506af9736..75e2147a0c 100644 --- a/src/pages/Organizations/views/Organization.add.jsx +++ b/src/pages/Organizations/views/Organization.add.jsx @@ -69,19 +69,6 @@ class OrganizationAdd extends React.Component { this.props.history.push('/organizations'); } - async componentDidMount() { - try { - const { data } = await api.get(API_CONFIG); - this.setState({ custom_virtualenvs: [...data.custom_virtualenvs] }); - if (this.state.custom_virtualenvs.length > 1) { - // Show dropdown if we have more than one ansible environment - this.setState({ hideAnsibleSelect: !this.state.hideAnsibleSelect }); - } - } catch (error) { - this.setState({ error }) - } - - } render() { const { name } = this.state; const enabled = name.length > 0; // TODO: add better form validation