Fix model page bug

This commit is contained in:
Yang Luo
2023-06-03 10:35:58 +08:00
parent 9cffb43265
commit c858d0e0b0

View File

@ -36,7 +36,6 @@ class ModelEditPage extends React.Component {
model: null, model: null,
organizations: [], organizations: [],
users: [], users: [],
models: [],
mode: props.location.mode !== undefined ? props.location.mode : "edit", mode: props.location.mode !== undefined ? props.location.mode : "edit",
}; };
} }
@ -52,8 +51,6 @@ class ModelEditPage extends React.Component {
this.setState({ this.setState({
model: model, model: model,
}); });
this.getModels(model.organization);
}); });
} }
@ -66,15 +63,6 @@ class ModelEditPage extends React.Component {
}); });
} }
getModels(organizationName) {
ModelBackend.getModels(organizationName)
.then((res) => {
this.setState({
models: res,
});
});
}
parseModelField(key, value) { parseModelField(key, value) {
if ([""].includes(key)) { if ([""].includes(key)) {
value = Setting.myParseInt(value); value = Setting.myParseInt(value);