New Param: added Param.query kwarg for crud operations like Retrieve and Search where criteria should not be validated

This commit is contained in:
Jason Gerard DeRose
2009-01-14 14:04:05 -07:00
parent 79422d0489
commit cd3508bace
3 changed files with 15 additions and 4 deletions

View File

@@ -229,6 +229,7 @@ class Param(ReadOnly):
('default_from', DefaultFrom, None),
('create_default', callable, None),
('autofill', bool, False),
('query', bool, False),
('flags', frozenset, frozenset()),
# The 'default' kwarg gets appended in Param.__init__():
@@ -489,6 +490,8 @@ class Param(ReadOnly):
:param value: A proposed value for this parameter.
"""
if self.query:
return
if value is None:
if self.required:
raise RequirementError(name=self.name)