diff --git a/src/openapi.yaml b/src/openapi.yaml index c0dcb2c2..e82ff975 100644 --- a/src/openapi.yaml +++ b/src/openapi.yaml @@ -776,6 +776,7 @@ components: type: string format: uuid readOnly: true + nullable: true description: De identificatie die binnen deze API gebruikt wordt voor de resource. upnUri: @@ -952,6 +953,7 @@ components: description: Het label en de link naar de procedure. productAanwezigToelichting: type: string + default: '' title: Aanwezig toelichting description: Een optioneel veld om uit te leggen waarom het product niet aanwezig is. Deze moet u alleen invullen als u het product niet levert @@ -1266,6 +1268,9 @@ components: te worden: `["9:00 - 18:00"]`' PaginatedGeneriekProductList: type: object + required: + - count + - results properties: count: type: integer @@ -1286,6 +1291,9 @@ components: $ref: '#/components/schemas/GeneriekProduct' PaginatedLocatieList: type: object + required: + - count + - results properties: count: type: integer @@ -1306,6 +1314,9 @@ components: $ref: '#/components/schemas/Locatie' PaginatedLokaleOverheidList: type: object + required: + - count + - results properties: count: type: integer @@ -1326,6 +1337,9 @@ components: $ref: '#/components/schemas/LokaleOverheid' PaginatedProductList: type: object + required: + - count + - results properties: count: type: integer @@ -1346,6 +1360,9 @@ components: $ref: '#/components/schemas/Product' PaginatedProductVersieList: type: object + required: + - count + - results properties: count: type: integer @@ -1366,6 +1383,9 @@ components: $ref: '#/components/schemas/ProductVersie' PaginatedProductenCatalogusList: type: object + required: + - count + - results properties: count: type: integer @@ -1679,6 +1699,7 @@ components: type: integer maximum: 2147483647 minimum: 0 + default: 1 description: Het versienummer van het product. gemaaktOp: type: string @@ -1732,6 +1753,7 @@ components: description: De organisatie die deze catalogus beheert. isReferentieCatalogus: type: boolean + default: false description: Een boolean die aangeeft of de catalogus een referentie catalogus betreft. Een referentie catalogus bevat geen echte productbeschrijvingen. referentieCatalogus: @@ -1747,6 +1769,7 @@ components: type: integer maximum: 2147483647 minimum: 0 + default: 1 description: De versie van deze catalogus. Op dit moment heeft de waarde geen betekenis. producten: diff --git a/src/sdg/accounts/admin.py b/src/sdg/accounts/admin.py index ca8cb215..af4798ee 100644 --- a/src/sdg/accounts/admin.py +++ b/src/sdg/accounts/admin.py @@ -3,8 +3,8 @@ from django.contrib import admin, messages from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin as _UserAdmin -from django.utils.translation import gettext_lazy as _ from django.utils.html import format_html +from django.utils.translation import gettext_lazy as _ from allauth.account.models import EmailAddress from django_otp.plugins.otp_totp.admin import TOTPDeviceAdmin diff --git a/src/sdg/core/tests/test_cms_enabled.py b/src/sdg/core/tests/test_cms_enabled.py index 3a31867f..26c62a4c 100644 --- a/src/sdg/core/tests/test_cms_enabled.py +++ b/src/sdg/core/tests/test_cms_enabled.py @@ -3,11 +3,10 @@ from django.test import override_settings from django.urls import reverse -from sdg.core.tests.utils import WebTest - from sdg.accounts.tests.factories import RoleFactory, SuperUserFactory from sdg.core.tests.factories.catalogus import ProductenCatalogusFactory from sdg.core.tests.factories.logius import OverheidsorganisatieFactory +from sdg.core.tests.utils import WebTest from sdg.organisaties.tests.factories.overheid import LokaleOverheidFactory diff --git a/src/sdg/core/tests/test_config.py b/src/sdg/core/tests/test_config.py index 44703000..eb607b35 100644 --- a/src/sdg/core/tests/test_config.py +++ b/src/sdg/core/tests/test_config.py @@ -1,13 +1,12 @@ from django.test import TestCase -from sdg.core.tests.utils import WebTest - from sdg.accounts.tests.factories import UserFactory from sdg.conf.types.organization import ( OrganizationTypeConfiguration, available_org_types, ) from sdg.core.models import SiteConfiguration +from sdg.core.tests.utils import WebTest class SiteConfigurationTests(WebTest): diff --git a/src/sdg/core/tests/test_views.py b/src/sdg/core/tests/test_views.py index 935fa50b..9a40f37d 100644 --- a/src/sdg/core/tests/test_views.py +++ b/src/sdg/core/tests/test_views.py @@ -1,10 +1,9 @@ from django.test import override_settings from django.urls import reverse -from sdg.core.tests.utils import WebTest - from sdg.accounts.tests.factories import RoleFactory, UserFactory from sdg.conf.utils import org_type_cfg +from sdg.core.tests.utils import WebTest HOME_URL = "core:home" CARD_SELECTOR = ".cards__card" diff --git a/src/sdg/core/tests/utils.py b/src/sdg/core/tests/utils.py index 433f0193..e43579a5 100644 --- a/src/sdg/core/tests/utils.py +++ b/src/sdg/core/tests/utils.py @@ -1,5 +1,4 @@ from django_webtest import WebTest as DjangoWebTest - from maykin_2fa.test import disable_admin_mfa as disable_mfa diff --git a/src/sdg/organisaties/management/commands/send_notification_mail.py b/src/sdg/organisaties/management/commands/send_notification_mail.py index a6eef344..61efa06c 100644 --- a/src/sdg/organisaties/management/commands/send_notification_mail.py +++ b/src/sdg/organisaties/management/commands/send_notification_mail.py @@ -3,10 +3,9 @@ from django.conf import settings from django.core.mail import send_mail from django.core.management import BaseCommand -from django.db.models import Q +from django.template.loader import render_to_string from django.utils.html import strip_tags from django.utils.timezone import now -from django.template.loader import render_to_string from dateutil.relativedelta import relativedelta diff --git a/src/sdg/organisaties/tests/test_bevoegde_organisaties.py b/src/sdg/organisaties/tests/test_bevoegde_organisaties.py index b3d386bd..21d31d0f 100644 --- a/src/sdg/organisaties/tests/test_bevoegde_organisaties.py +++ b/src/sdg/organisaties/tests/test_bevoegde_organisaties.py @@ -1,9 +1,8 @@ from django.urls import reverse_lazy -from sdg.core.tests.utils import WebTest - from sdg.accounts.tests.factories import RoleFactory, UserFactory from sdg.core.tests.factories.logius import OverheidsorganisatieFactory +from sdg.core.tests.utils import WebTest from sdg.organisaties.tests.factories.overheid import LokaleOverheidFactory diff --git a/src/sdg/organisaties/tests/test_invitation.py b/src/sdg/organisaties/tests/test_invitation.py index 6cd4ab24..e0aa011c 100644 --- a/src/sdg/organisaties/tests/test_invitation.py +++ b/src/sdg/organisaties/tests/test_invitation.py @@ -5,11 +5,10 @@ from django.urls import reverse from django.utils.translation import gettext as _ -from sdg.core.tests.utils import WebTest - from sdg.accounts.models import UserInvitation from sdg.accounts.tests.factories import RoleFactory, UserFactory from sdg.conf.utils import org_type_cfg +from sdg.core.tests.utils import WebTest from sdg.organisaties.tests.factories.overheid import LokaleOverheidFactory INVITATION_URL = "organisaties:roles:invitation_create" diff --git a/src/sdg/organisaties/tests/test_notificaties.py b/src/sdg/organisaties/tests/test_notificaties.py index b7ba0794..c4cba07f 100644 --- a/src/sdg/organisaties/tests/test_notificaties.py +++ b/src/sdg/organisaties/tests/test_notificaties.py @@ -1,13 +1,9 @@ -from django.conf import settings from django.contrib.auth import get_user_model -from django.core import mail from django.urls import reverse from django.utils.timezone import now -from sdg.core.tests.utils import WebTest - -from sdg.accounts.models import UserInvitation from sdg.accounts.tests.factories import RoleFactory, UserFactory +from sdg.core.tests.utils import WebTest from sdg.organisaties.tests.factories.overheid import LokaleOverheidFactory from sdg.producten.tests.factories.product import ( ProductVersieFactory, diff --git a/src/sdg/organisaties/tests/test_overheden.py b/src/sdg/organisaties/tests/test_overheden.py index cb29fdf1..bac28ba2 100644 --- a/src/sdg/organisaties/tests/test_overheden.py +++ b/src/sdg/organisaties/tests/test_overheden.py @@ -5,13 +5,13 @@ from django.urls import reverse from django.utils.translation import gettext as _ -from sdg.core.tests.utils import WebTest from freezegun import freeze_time from sdg.accounts.tests.factories import RoleFactory, UserFactory from sdg.core.constants import GenericProductStatus from sdg.core.tests.factories.catalogus import ProductenCatalogusFactory from sdg.core.tests.factories.logius import OverheidsorganisatieFactory +from sdg.core.tests.utils import WebTest from sdg.organisaties.tests.factories.overheid import ( BevoegdeOrganisatieFactory, LocatieFactory, diff --git a/src/sdg/organisaties/tests/test_roles.py b/src/sdg/organisaties/tests/test_roles.py index 295aa3f6..51b26b2c 100644 --- a/src/sdg/organisaties/tests/test_roles.py +++ b/src/sdg/organisaties/tests/test_roles.py @@ -1,9 +1,8 @@ from django.urls import reverse_lazy -from sdg.core.tests.utils import WebTest - from sdg.accounts.models import Role from sdg.accounts.tests.factories import RoleFactory, UserFactory +from sdg.core.tests.utils import WebTest from sdg.organisaties.tests.factories.overheid import LokaleOverheidFactory diff --git a/src/sdg/producten/tests/test_product.py b/src/sdg/producten/tests/test_product.py index 6e73c293..c19504a5 100644 --- a/src/sdg/producten/tests/test_product.py +++ b/src/sdg/producten/tests/test_product.py @@ -5,7 +5,6 @@ from django.urls import reverse from django.utils.translation import gettext as _ -from sdg.core.tests.utils import WebTest from freezegun import freeze_time from sdg.accounts.tests.factories import RoleFactory, UserFactory @@ -13,7 +12,7 @@ from sdg.core.constants import GenericProductStatus, TaalChoices from sdg.core.constants.product import DoelgroepChoices from sdg.core.tests.factories.logius import OverheidsorganisatieFactory -from sdg.core.tests.utils import hard_refresh_from_db +from sdg.core.tests.utils import WebTest, hard_refresh_from_db from sdg.organisaties.tests.factories.overheid import BevoegdeOrganisatieFactory from sdg.producten.models import Product from sdg.producten.tests.constants import ( diff --git a/src/sdg/urls.py b/src/sdg/urls.py index 80eeb149..8c82440b 100644 --- a/src/sdg/urls.py +++ b/src/sdg/urls.py @@ -8,9 +8,9 @@ from django.utils.translation import gettext_lazy as _ from decorator_include import decorator_include -from two_factor.urls import urlpatterns as tf_urls from maykin_2fa import monkeypatch_admin from maykin_2fa.urls import urlpatterns, webauthn_urlpatterns +from two_factor.urls import urlpatterns as tf_urls from sdg import miscellaneous_urls from sdg.accounts.views.password_reset import PasswordResetView, ResendInventation