From 3c7e421f59afb0c491a0755c7b6d247b292f2677 Mon Sep 17 00:00:00 2001 From: Nate Kennison Date: Mon, 6 May 2024 15:02:17 -0400 Subject: [PATCH] fix for empy comments causing pydantic validation error --- regrws/models/nested.py | 2 +- tests/payloads.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/regrws/models/nested.py b/regrws/models/nested.py index a16a41c..b208f35 100644 --- a/regrws/models/nested.py +++ b/regrws/models/nested.py @@ -39,7 +39,7 @@ class Iso31661(BaseModel, tag="iso3166-1", nsmap=NSMAP): class MultiLineElement(BaseModel): number: int = attr() - line: str + line: str | None = '' class Attachment(BaseModel, tag="attachment", nsmap=NSMAP): diff --git a/tests/payloads.py b/tests/payloads.py index ffd9c86..d85a6d9 100644 --- a/tests/payloads.py +++ b/tests/payloads.py @@ -12,11 +12,15 @@ Line 1 + + Line 3 Chantilly 20151 Line 1 + + Line 3 Mon Nov 07 14:04:28 EST 2011 ARIN-HOSTMASTER @@ -47,12 +51,16 @@ Line 1 + + Line 3 Chantilly VA 20151 Line 1 + + Line 3 ARIN Mon Nov 07 14:04:28 EST 2011 @@ -78,12 +86,16 @@ C1241523 Line 1 + + Line 3 Chantilly VA 20151 Line 1 + + Line 3 CUST PARENTORGHANDLE @@ -105,6 +117,8 @@ 4 Line 1 + + Line 3 Tue Jan 25 16:17:18 EST 2011 NET-10-0-0-0-1 @@ -155,6 +169,8 @@ SUBJECT Line 1 + + Line 3 NONE