Merge pull request #670 from frrad/patch-1

Fix warning in models.py
This commit is contained in:
Pit 2020-06-07 22:21:36 +02:00 committed by GitHub
commit 3910d9644b
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 # Find delimiter
delimiter = t.name.find('_') delimiter = t.name.find('_')
if delimiter is -1: if delimiter == -1:
delimiter = t.name.find('-') delimiter = t.name.find('-')
if delimiter is -1: if delimiter == -1:
continue continue
key = t.name[:delimiter] key = t.name[:delimiter]