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] attributes = attributes[0]
# Avoiding duplicated attributes # Avoiding duplicated attributes
attributes1 = [] if len(set(attributes)) != len (attributes):
for i in attributes: raise Exception('Duplicated attributes in projection')
if i not in attributes1:
attributes1.append(i)
attributes = attributes1
ids = self.header.getAttributesId(attributes) ids = self.header.getAttributesId(attributes)