From 82e551cce4631f3db53101230e09039afe331f32 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Mon, 14 Jul 2008 13:04:32 +0000 Subject: [PATCH] preventing duplicated fields in projection git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@4 014f5005-505e-4b48-8d0a-63407b615a7c --- relation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/relation.py b/relation.py index d52a09d..d9175ab 100644 --- a/relation.py +++ b/relation.py @@ -81,6 +81,13 @@ class relation (object): if fields[0].__class__ == list().__class__: 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) if len(ids)==0: