From: Tony Mack Date: Fri, 11 Sep 2009 20:14:05 +0000 (+0000) Subject: looke at GeniRecord.all_fields to determine the allowed fields X-Git-Tag: sfa-0.9-2~38 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a617e323c127fd375b4159a77c52c054317b893a;p=sfa.git looke at GeniRecord.all_fields to determine the allowed fields --- diff --git a/sfa/util/filter.py b/sfa/util/filter.py index d9890cf1..ba7cdae8 100644 --- 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 - 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