Fix warning in models.py

This commit is contained in:
Frederick Robinson 2020-06-02 11:52:44 -07:00 committed by GitHub
parent f99cb08783
commit 19f0a65fdd

View File

@ -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]