diff --git a/swh/model/model.py b/swh/model/model.py --- a/swh/model/model.py +++ b/swh/model/model.py @@ -341,8 +341,8 @@ @length.validator def check_length(self, attribute, value): """Checks the length is positive.""" - if value < 0: - raise ValueError('Length must be positive.') + if value < -1: + raise ValueError('Length must be positive or -1.') @reason.validator def check_reason(self, attribute, value):