Skip to content

Commit

Permalink
remove underPrivilige from datamodel
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenHosper committed Jan 10, 2025
1 parent c4397da commit 818a6b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


- Bugfix: GLD-Closure template
- Enhancement: Do not require underPrivilige for GMW


## 0.77 (2025-01-02)
Expand Down
11 changes: 0 additions & 11 deletions api/bro_upload/upload_datamodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,9 @@ class UploadTaskMetadata(BaseModel):
deliveryAccountableParty: str | None = None
qualityRegime: str
broId: str | None = None
underPrivilege: str | None = None
correctionReason: str | None = None
dateToBeCorrected: str | date | None = None

@root_validator(pre=True)
def format_underPrivilege(cls, values):
# Check and set `underPrivilege`
if values.get("qualityRegime") == "IMBRO/A" and not values.get(
"underPrivilege"
):
values["underPrivilege"] = "ja"

return values


class GARBulkUploadMetadata(BaseModel):
requestReference: str
Expand Down

0 comments on commit 818a6b9

Please sign in to comment.