preventing duplicated fields in projection

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@4 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2008-07-14 13:04:32 +07:00
parent 1efc1dc3c7
commit 82e551cce4
1 changed files with 7 additions and 0 deletions

@ -81,6 +81,13 @@ class relation (object):
if fields[0].__class__ == list().__class__: if fields[0].__class__ == list().__class__:
fields=fields[0] fields=fields[0]
#Avoiding duplicated fields
fields1=[]
for i in fields:
if i not in fields1:
fields1.append(i)
fields=fields1
ids=self.header.getFieldsId(fields) ids=self.header.getFieldsId(fields)
if len(ids)==0: if len(ids)==0: