mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:41:46 +08:00
feat: show 404 error for non-existent objects in edit pages
This commit is contained in:
@ -50,6 +50,11 @@ class OrganizationEditPage extends React.Component {
|
||||
getOrganization() {
|
||||
OrganizationBackend.getOrganization("admin", this.state.organizationName)
|
||||
.then((organization) => {
|
||||
if (organization === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
organization: organization,
|
||||
});
|
||||
|
Reference in New Issue
Block a user