git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd69c11
)
looke at GeniRecord.all_fields to determine the allowed fields
author
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 Sep 2009 20:14:05 +0000
(20:14 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 Sep 2009 20:14:05 +0000
(20:14 +0000)
sfa/util/filter.py
patch
|
blob
|
history
diff --git
a/sfa/util/filter.py
b/sfa/util/filter.py
index
d9890cf
..
ba7cdae
100644
(file)
--- a/
sfa/util/filter.py
+++ b/
sfa/util/filter.py
@@
-72,7
+72,11
@@
class Filter(Parameter, dict):
def __init__(self, fields = {}, filter = {}, doc = "Attribute filter"):
# Store the filter in our dict instance
def __init__(self, fields = {}, filter = {}, doc = "Attribute filter"):
# Store the filter in our dict instance
- dict.__init__(self, filter)
+ valid_fields = {}
+ for field in filter:
+ if field in fields:
+ valid_fields[field] = filter[field]
+ dict.__init__(self, valid_fields)
# Declare ourselves as a type of parameter that can take
# either a value or a list of values for each of the specified
# Declare ourselves as a type of parameter that can take
# either a value or a list of values for each of the specified