Get rid of newstyle flag for Form.validate() method

we always/only use "new style" now
This commit is contained in:
Lance Edgar 2023-05-14 20:28:48 -05:00
parent a991dc0684
commit 85947878c4
17 changed files with 75 additions and 72 deletions

View file

@ -407,7 +407,7 @@ class ReceivingBatchRowViews(APIBatchRowView):
form = forms.Form(schema=schema, request=self.request)
# TODO: this seems hacky, but avoids "complex" date value parsing
form.set_widget('expiration_date', dfwidget.TextInputWidget())
if not form.validate(newstyle=True):
if not form.validate():
log.debug("form did not validate: %s",
form.make_deform_form().error)
return {'error': "Form did not validate"}

View file

@ -89,7 +89,7 @@ class CommonView(APIView):
# identical; perhaps should merge somehow?
schema = Feedback().bind(session=Session())
form = forms.Form(schema=schema, request=self.request)
if form.validate(newstyle=True):
if form.validate():
data = dict(form.validated)
# figure out who the sending user is, if any