From 10cb60f48eddf5a4c0968a3a6b2267975fd0284f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 16 May 2021 17:32:08 +0200 Subject: [PATCH] api: fix pagination not being required in schema Signed-off-by: Jens Langhammer --- authentik/api/pagination.py | 10 ++++++++++ web/src/pages/applications/ApplicationForm.ts | 6 +++--- web/src/pages/stages/captcha/CaptchaStageForm.ts | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/authentik/api/pagination.py b/authentik/api/pagination.py index 435a33b3f..4e4c79efd 100644 --- a/authentik/api/pagination.py +++ b/authentik/api/pagination.py @@ -60,7 +60,17 @@ class Pagination(pagination.PageNumberPagination): "type": "number", }, }, + "required": [ + "next", + "previous", + "count", + "current", + "total_pages", + "start_index", + "end_index", + ] }, "results": schema, }, + "required": ["pagination", "results"], } diff --git a/web/src/pages/applications/ApplicationForm.ts b/web/src/pages/applications/ApplicationForm.ts index bbf14498a..15dee4e2f 100644 --- a/web/src/pages/applications/ApplicationForm.ts +++ b/web/src/pages/applications/ApplicationForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, Application, ProvidersApi, Provider, PolicyEngineModeEnum } from "authentik-api"; +import { CoreApi, Application, ProvidersApi, Provider, PolicyEngineMode } from "authentik-api"; import { t } from "@lingui/macro"; import { CSSResult, customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; @@ -145,10 +145,10 @@ export class ApplicationForm extends ModelForm { ?required=${true} name="policyEngineMode"> diff --git a/web/src/pages/stages/captcha/CaptchaStageForm.ts b/web/src/pages/stages/captcha/CaptchaStageForm.ts index b6ab2c591..934c5bbd7 100644 --- a/web/src/pages/stages/captcha/CaptchaStageForm.ts +++ b/web/src/pages/stages/captcha/CaptchaStageForm.ts @@ -66,7 +66,7 @@ export class CaptchaStageForm extends ModelForm { ?required=${true} ?writeOnly=${this.instance !== undefined} name="privateKey"> - +

${t`Private key, acquired from https://www.google.com/recaptcha/intro/v3.html.`}