Raise exception for duplicated attrs in projection

Rather than ignoring them, raise an exception
master
Salvo 'LtWorf' Tomaselli 2015-06-06 14:15:47 +07:00
parent bbc2855cc5
commit b12ea8d27a
1 changed files with 2 additions and 5 deletions

@ -153,11 +153,8 @@ class relation (object):
attributes = attributes[0]
# Avoiding duplicated attributes
attributes1 = []
for i in attributes:
if i not in attributes1:
attributes1.append(i)
attributes = attributes1
if len(set(attributes)) != len (attributes):
raise Exception('Duplicated attributes in projection')
ids = self.header.getAttributesId(attributes)