Yet another fix for user feedback form handling

This commit is contained in:
Lance Edgar 2019-08-04 22:59:32 -05:00
parent 243c69b231
commit f3ac3ca25e

View file

@ -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(),