From f7f18a3f2b71f4a1a8b8ac0506229e7ddaf5ab64 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu, 27 Feb 2020 15:12:07 +0100 Subject: [PATCH] Make attributes name and email of Person optional. Required by loaders, when they can't parse the fullname. --- swh/model/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swh/model/model.py b/swh/model/model.py index 75544410..aff5a7d6 100644 --- a/swh/model/model.py +++ b/swh/model/model.py @@ -84,9 +84,9 @@ class HashableObject(metaclass=ABCMeta): @attr.s(frozen=True) class Person(BaseModel): """Represents the author/committer of a revision or release.""" - name = attr.ib(type=bytes) - email = attr.ib(type=bytes) fullname = attr.ib(type=bytes) + name = attr.ib(type=Optional[bytes]) + email = attr.ib(type=Optional[bytes]) @attr.s(frozen=True) -- GitLab