From d14dd7a9f3d9fd817f1108ade7e13ca978aef469 Mon Sep 17 00:00:00 2001 From: Eva Bardou <ebardou@teklia.com> Date: Tue, 27 Apr 2021 13:41:47 +0200 Subject: [PATCH] Fix create_transcription_entity assertions --- arkindex_worker/worker/entity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkindex_worker/worker/entity.py b/arkindex_worker/worker/entity.py index 3f3876e1..9992b549 100644 --- a/arkindex_worker/worker/entity.py +++ b/arkindex_worker/worker/entity.py @@ -93,10 +93,10 @@ class EntityMixin(object): entity, str ), "entity shouldn't be null and should be of type str" assert ( - offset and isinstance(offset, int) and offset >= 0 + offset is not None and isinstance(offset, int) and offset >= 0 ), "offset shouldn't be null and should be a positive integer" assert ( - length and isinstance(length, int) and length > 0 + length is not None and isinstance(length, int) and length > 0 ), "length shouldn't be null and should be a strictly positive integer" if self.is_read_only: logger.warning( -- GitLab