mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
feat: show 404 error for non-existent objects in edit pages
This commit is contained in:
@ -48,6 +48,11 @@ class ModelEditPage extends React.Component {
|
||||
getModel() {
|
||||
ModelBackend.getModel(this.state.organizationName, this.state.modelName)
|
||||
.then((model) => {
|
||||
if (model === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
model: model,
|
||||
});
|
||||
|
Reference in New Issue
Block a user