From 77a20e1bd28754a6990a0332dbe6d6a9da5db214 Mon Sep 17 00:00:00 2001 From: Frederick Robinson Date: Tue, 2 Jun 2020 11:52:44 -0700 Subject: [PATCH] Fix warning in models.py --- src/documents/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documents/models.py b/src/documents/models.py index 518a7b617..f051e3062 100644 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -336,10 +336,10 @@ class Document(models.Model): # Find delimiter delimiter = t.name.find('_') - if delimiter is -1: + if delimiter == -1: delimiter = t.name.find('-') - if delimiter is -1: + if delimiter == -1: continue key = t.name[:delimiter]