视图ProjectManagementapp.views.product_insert_view没有返回HttpResponse对象。它返回None

时间:2019-08-25 11:31:49

标签: python django

“我要创建一个项目,但是我的代码中出现httpresponse错误,我该怎么办?”

canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
    const config: AllowedActionsGuardConfig = route.data['AllowedActionsGuardConfig'];

    if (this.authService.currentUser.hasAllowedUserRoleAction(config.AllowedActions)) {
        this.router.navigate([
            `${!config.AbsolutePath ? state.url : ''}${config.NavigateToOnAuthorized}`,
        ]);

        return true;
    } else {
        this.router.navigate([
            `${!config.AbsolutePath ? state.url : ''}${config.FallbackOnUnauthorized}`,
        ]);
        return false;
    }
}

0 个答案:

没有答案