From e99a5f22b3e6a68a7e70ee14c050afdc62b0a3f5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed, 4 Sep 2019 14:35:20 +0200 Subject: [PATCH] Make Origin type optional. Needed by the replayer in swh-journal. --- swh/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swh/model/model.py b/swh/model/model.py index fc5a21fc..21bd45e2 100644 --- a/swh/model/model.py +++ b/swh/model/model.py @@ -94,8 +94,8 @@ class TimestampWithTimezone(BaseModel): @attr.s class Origin(BaseModel): """Represents a software source: a VCS and an URL.""" - type = attr.ib(type=str) url = attr.ib(type=str) + type = attr.ib(type=Optional[str], default=None) @attr.s -- GitLab