mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Fix model page bug
This commit is contained in:
@ -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);
|
||||||
|
Reference in New Issue
Block a user