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