Skip to content

Commit

Permalink
store id before checking custom validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Dec 11, 2023
1 parent 7563899 commit d43e422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py4web/utils/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,10 @@ def __init__(
self.record and self.record.get(field_name) or None
)
self.vars.update(validated_vars)
if validation:
validation(self)
if self.record and dbio:
self.vars["id"] = self.record.id
if validation:
validation(self)
if not self.errors:
for file in uploaded_files:
field, value = file
Expand Down

0 comments on commit d43e422

Please sign in to comment.