Fix warning in models.py

This commit is contained in:
Frederick Robinson 2020-06-02 11:52:44 -07:00 committed by GitHub
parent 38403b78b6
commit 77a20e1bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]