Yet another fix for user feedback form handling
This commit is contained in:
parent
243c69b231
commit
f3ac3ca25e
|
@ -51,7 +51,6 @@ from tailbone.util import set_app_theme
|
||||||
def validate_user(node, kw):
|
def validate_user(node, kw):
|
||||||
session = kw['session']
|
session = kw['session']
|
||||||
def validate(node, value):
|
def validate(node, value):
|
||||||
import ipdb; ipdb.set_trace()
|
|
||||||
user = session.query(model.User).get(value)
|
user = session.query(model.User).get(value)
|
||||||
if not user:
|
if not user:
|
||||||
raise colander.Invalid(node, "User not found")
|
raise colander.Invalid(node, "User not found")
|
||||||
|
@ -66,7 +65,7 @@ class Feedback(colander.Schema):
|
||||||
referrer = colander.SchemaNode(colander.String())
|
referrer = colander.SchemaNode(colander.String())
|
||||||
|
|
||||||
user = colander.SchemaNode(colander.String(),
|
user = colander.SchemaNode(colander.String(),
|
||||||
# missing=colander.null,
|
missing=colander.null,
|
||||||
validator=validate_user)
|
validator=validate_user)
|
||||||
|
|
||||||
user_name = colander.SchemaNode(colander.String(),
|
user_name = colander.SchemaNode(colander.String(),
|
||||||
|
|
Loading…
Reference in a new issue