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 @@ def many_to_dictionary(field): # 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]