Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix warning in models.py

Frederick Robinson77a20e1bd287
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]