Skip to content

Commit 1e03313

Browse files
committed
revert date workarounds in api models
1 parent bbc6a01 commit 1e03313

2 files changed

Lines changed: 14 additions & 17 deletions

File tree

src/open_inwoner/openzaak/api_models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ class ZaakType(ZGWModel):
173173
# besluittypen: list
174174

175175
# TODO: broken in DECOS
176-
# begin_geldigheid: Optional[date] = None
177-
# einde_geldigheid: Optional[date] = None
176+
begin_geldigheid: Optional[date] = None
177+
einde_geldigheid: Optional[date] = None
178178
versiedatum: Optional[date] = None
179179
concept: Optional[bool] = None
180180

@@ -197,8 +197,8 @@ class InformatieObjectType(ZGWModel):
197197
omschrijving: str
198198
vertrouwelijkheidaanduiding: str
199199
# Decos gives missing as empty strings
200-
# begin_geldigheid: Optional[date] = None
201-
# einde_geldigheid: Optional[date] = None
200+
begin_geldigheid: Optional[date] = None
201+
einde_geldigheid: Optional[date] = None
202202
concept: bool = False
203203

204204

src/open_inwoner/openzaak/utils.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import logging
22

3-
from zgw_consumers.api_models.constants import (RolTypes,
4-
VertrouwelijkheidsAanduidingen)
3+
from zgw_consumers.api_models.constants import RolTypes, VertrouwelijkheidsAanduidingen
54

6-
from open_inwoner.openzaak.api_models import (InformatieObject, Rol, Zaak,
7-
ZaakType)
5+
from open_inwoner.openzaak.api_models import InformatieObject, Rol, Zaak, ZaakType
86

9-
from .models import (OpenZaakConfig, ZaakTypeConfig,
10-
ZaakTypeInformatieObjectTypeConfig)
7+
from .models import OpenZaakConfig, ZaakTypeConfig, ZaakTypeInformatieObjectTypeConfig
118

129
logger = logging.getLogger(__name__)
1310

@@ -46,13 +43,13 @@ def is_info_object_visible(
4643
We check on its definitive or archived status, and a maximum confidentiality
4744
level (compared the ordering from the VertrouwelijkheidsAanduidingen.choices)
4845
"""
49-
# if info_object.status not in ["definitief", "gearchiveerd"]:
50-
# logger.info(
51-
# "Ignoring informatieobject %s as not visible for user: status is neither "
52-
# "'definitief' nor 'gearchiveerd'",
53-
# info_object.url,
54-
# )
55-
# return False
46+
if info_object.status not in ["definitief", "gearchiveerd"]:
47+
logger.info(
48+
"Ignoring informatieobject %s as not visible for user: status is neither "
49+
"'definitief' nor 'gearchiveerd'",
50+
info_object.url,
51+
)
52+
return False
5653

5754
return is_object_visible(info_object, max_confidentiality_level)
5855

0 commit comments

Comments
 (0)