19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:27 +01:00
parent d1963a3c3a
commit 2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions

View file

@ -7,6 +7,7 @@ from __future__ import annotations
import ast
import collections
import collections.abc
import itertools
import logging
from datetime import datetime, date
@ -579,8 +580,15 @@ class Form:
self._env.flush_all()
self._env.clear() # discard cache and pending recomputations
if result.get('warning'):
_logger.getChild('onchange').warning("%(title)s %(message)s", result['warning'])
if w := result.get('warning'):
if isinstance(w, collections.abc.Mapping) and w.keys() >= {'title', 'message'}:
_logger.getChild('onchange').warning("%(title)s %(message)s", w)
else:
_logger.getChild('onchange').error(
"received invalid warning %r from onchange on %r (should be a dict with keys `title` and `message`)",
w,
field_names,
)
if not field_name:
# fill in whatever fields are still missing with falsy values