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