Raise exception for duplicated attrs in projection

Rather than ignoring them, raise an exception
This commit is contained in:
Salvo 'LtWorf' Tomaselli 2015-06-06 14:15:47 +02:00
parent bbc2855cc5
commit b12ea8d27a

View File

@ -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)