From a437ebcc7f7477cece6850466318b6968891633b Mon Sep 17 00:00:00 2001 From: eltbus <33374178+eltbus@users.noreply.github.com> Date: Sat, 17 Feb 2024 10:56:48 +0100 Subject: [PATCH] Minor fix for `Field.__repr__` (#114) --- multipart/multipart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipart/multipart.py b/multipart/multipart.py index ea8ccca..170151f 100644 --- a/multipart/multipart.py +++ b/multipart/multipart.py @@ -304,7 +304,7 @@ def __eq__(self, other: object) -> bool: return NotImplemented def __repr__(self) -> str: - if len(self.value) > 97: + if self.value is not None and len(self.value) > 97: # We get the repr, and then insert three dots before the final # quote. v = repr(self.value[:97])[:-1] + "...'"