Skip to content

Commit b885671

Browse files
Sonny BakkerSonnyBA
Sonny Bakker
authored andcommitted
[#197] show klant data in error log
1 parent e59c5cf commit b885671

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openklant/management/commands/migrate_to_v2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import logging
66
import os
7-
from dataclasses import fields as dataclass_fields
7+
from dataclasses import asdict, fields as dataclass_fields
88
from typing import Any, Tuple
99
from urllib.parse import parse_qs, urlparse
1010

@@ -112,7 +112,7 @@ def _save_klanten(url: str, klanten: list[Klant]) -> list[str]:
112112
partij = klant.to_partij(digitaal_adres=digitaal_adres_ref)
113113

114114
if not partij:
115-
logger.error("Unable to create partij, skipping klant..")
115+
logger.error(f"Unable to create partij for klant: {asdict(klant)}")
116116
continue
117117

118118
response_data = openklant_client.create(PARTIJEN_PATH, partij.dict())

0 commit comments

Comments
 (0)