checking first there are duplciates ids before changing to unique names

This commit is contained in:
palaviv 2016-03-23 18:47:27 +02:00
parent 412042d987
commit c66aedfa65
1 changed files with 2 additions and 2 deletions

View File

@ -1153,9 +1153,9 @@ def _idvalset(idx, valset, argnames, idfn, ids):
def idmaker(argnames, argvalues, idfn=None, ids=None):
ids = [_idvalset(valindex, valset, argnames, idfn, ids)
for valindex, valset in enumerate(argvalues)]
duplicates = [testid for testid in ids if ids.count(testid) > 1]
if duplicates:
if len(set(ids)) != len(ids):
# The ids are not unique
duplicates = [testid for testid in ids if ids.count(testid) > 1]
counters = collections.defaultdict(lambda: 0)
for index, testid in enumerate(ids):
if testid in duplicates: