diff --git a/blueprints/schema.json b/blueprints/schema.json index 91ade14742..db4b3b03d6 100644 --- a/blueprints/schema.json +++ b/blueprints/schema.json @@ -9175,7 +9175,6 @@ "CO", "KM", "CG", - "CD", "CK", "CR", "CI", @@ -9184,6 +9183,7 @@ "CW", "CY", "CZ", + "CD", "DK", "DJ", "DM", @@ -9222,7 +9222,6 @@ "GY", "HT", "HM", - "VA", "HN", "HK", "HU", @@ -9364,6 +9363,7 @@ "UY", "UZ", "VU", + "VA", "VE", "VN", "VG", diff --git a/pyproject.toml b/pyproject.toml index 9e388cb810..4e406782b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ dependencies = [ "deepmerge==2.0", "defusedxml==0.7.1", "django-channels-postgres", - "django-countries==7.6.1", + "django-countries==8.2.0", "django-dramatiq-postgres", "django-filter==25.2", "django-model-utils==5.0.0", diff --git a/schema.yml b/schema.yml index 40da331a23..f26e1b0f9c 100644 --- a/schema.yml +++ b/schema.yml @@ -36550,7 +36550,6 @@ components: - CO - KM - CG - - CD - CK - CR - CI @@ -36559,6 +36558,7 @@ components: - CW - CY - CZ + - CD - DK - DJ - DM @@ -36597,7 +36597,6 @@ components: - GY - HT - HM - - VA - HN - HK - HU @@ -36739,6 +36738,7 @@ components: - UY - UZ - VU + - VA - VE - VN - VG @@ -36937,16 +36937,6 @@ components: required: - code - name - DetailedCountryField: - type: object - properties: - code: - $ref: '#/components/schemas/CountryCodeEnum' - name: - type: string - required: - - code - - name Device: type: object description: Serializer for authenticator devices @@ -39457,7 +39447,17 @@ components: countries_obj: type: array items: - $ref: '#/components/schemas/DetailedCountryField' + type: object + properties: + code: + type: string + minLength: 2 + maxLength: 2 + name: + type: string + required: + - code + - name readOnly: true check_history_distance: type: boolean diff --git a/uv.lock b/uv.lock index 25dd40e426..e734e02d4f 100644 --- a/uv.lock +++ b/uv.lock @@ -334,7 +334,7 @@ requires-dist = [ { name = "defusedxml", specifier = "==0.7.1" }, { name = "django", specifier = "==5.2.11" }, { name = "django-channels-postgres", editable = "packages/django-channels-postgres" }, - { name = "django-countries", specifier = "==7.6.1" }, + { name = "django-countries", specifier = "==8.2.0" }, { name = "django-dramatiq-postgres", editable = "packages/django-dramatiq-postgres" }, { name = "django-filter", specifier = "==25.2" }, { name = "django-model-utils", specifier = "==5.0.0" }, @@ -1116,15 +1116,15 @@ requires-dist = [ [[package]] name = "django-countries" -version = "7.6.1" +version = "8.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "asgiref" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/0b/c3/ddb94bb50455ae80ff90ddb5affcc28f7e7a48f9c9852cf8bb8fe712fec0/django-countries-7.6.1.tar.gz", hash = "sha256:c772d4e3e54afcc5f97a018544e96f246c6d9f1db51898ab0c15cd57e19437cf", size = 675623, upload-time = "2024-04-01T21:01:09.414Z" } +sdist = { url = "https://files.pythonhosted.org/packages/67/2e/ed67f8f460d1de25ee64fca5d7f219680f944fc8ac5a29fbede3574dc3db/django_countries-8.2.0.tar.gz", hash = "sha256:6df3883180599052c7dfa9a8be0601792441cfb248935dc229ad1ac92e9e39e3", size = 2455542, upload-time = "2025-11-24T19:57:08.071Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/46/b6931858e5161e5d9166bfcfde3af0b7d60ba89e4f7dd8f033e591c68794/django_countries-7.6.1-py3-none-any.whl", hash = "sha256:1ed20842fe0f6194f91faca21076649513846a8787c9eb5aeec3cbe1656b8acc", size = 864507, upload-time = "2024-04-01T21:01:05.702Z" }, + { url = "https://files.pythonhosted.org/packages/20/3c/9ebd7ed021b7c519bac954bc88146bc870e7d3c8db2580fa67268464fd2e/django_countries-8.2.0-py3-none-any.whl", hash = "sha256:2b2617bec7c15dc735bdec38ae89f0058e38fddfffdb19a7f6b75ef1e3d5380f", size = 3776079, upload-time = "2025-11-24T19:57:05.576Z" }, ] [[package]] diff --git a/web/src/admin/policies/geoip/GeoIPPolicyForm.ts b/web/src/admin/policies/geoip/GeoIPPolicyForm.ts index 0a5a4f6bc3..4807f57702 100644 --- a/web/src/admin/policies/geoip/GeoIPPolicyForm.ts +++ b/web/src/admin/policies/geoip/GeoIPPolicyForm.ts @@ -12,13 +12,13 @@ import { DataProvision, DualSelectPair } from "#elements/ak-dual-select/types"; import { BasePolicyForm } from "#admin/policies/BasePolicyForm"; -import { DetailedCountry, GeoIPPolicy, PoliciesApi } from "@goauthentik/api"; +import { GeoIPPolicy, GeoIPPolicyCountriesObjInner, PoliciesApi } from "@goauthentik/api"; import { msg } from "@lit/localize"; import { html, TemplateResult } from "lit"; import { customElement } from "lit/decorators.js"; -function countryToPair(country: DetailedCountry): DualSelectPair { +function countryToPair(country: GeoIPPolicyCountriesObjInner): DualSelectPair { return [country.code, country.name, country.name]; }