Raise exception for duplicated attrs in projection
Rather than ignoring them, raise an exception
This commit is contained in:
parent
bbc2855cc5
commit
b12ea8d27a
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user