fix: normalise None to empty string for required str fields (company, desc, tags)
Made-with: Cursor
This commit is contained in:
parent
a6be2b90e0
commit
e94df6c647
1 changed files with 4 additions and 0 deletions
|
|
@ -154,6 +154,10 @@ def _sanitisePositionPayload(data: Dict[str, Any]) -> Dict[str, Any]:
|
|||
else:
|
||||
safeData["documentType"] = None
|
||||
|
||||
for requiredStrField in ("company", "desc", "tags"):
|
||||
val = safeData.get(requiredStrField)
|
||||
safeData[requiredStrField] = str(val).strip() if val is not None else ""
|
||||
|
||||
for strField in ("payeeIban", "payeeName", "payeeBic", "paymentReference"):
|
||||
val = safeData.get(strField)
|
||||
if val:
|
||||
|
|
|
|||
Loading…
Reference in a new issue