feat: fix response data assignment error (#2123)

This commit is contained in:
Yaodong Yu
2023-07-24 14:52:30 +08:00
committed by GitHub
parent 3c4112dd44
commit 577bd6ce58
11 changed files with 28 additions and 29 deletions

View File

@ -46,18 +46,18 @@ class PlanEditPage extends React.Component {
getPlan() {
PlanBackend.getPlan(this.state.organizationName, this.state.planName)
.then((plan) => {
if (plan === null) {
.then((res) => {
if (res.data === null) {
this.props.history.push("/404");
return;
}
this.setState({
plan: plan,
plan: res.data,
});
this.getUsers(plan.owner);
this.getRoles(plan.owner);
this.getUsers(this.state.organizationName);
this.getRoles(this.state.organizationName);
});
}