Skip to content

Fix typo causing error in IS_LIST_OF.formatter#762

Merged
mdipierro merged 1 commit intoweb2py:masterfrom
educationwarehouse:master
Mar 3, 2026
Merged

Fix typo causing error in IS_LIST_OF.formatter#762
mdipierro merged 1 commit intoweb2py:masterfrom
educationwarehouse:master

Conversation

@robinvandernoord
Copy link
Contributor

There was a typo in IS_LIST_OF.formatter where it referenced self.other.fomatter (without 'r').
This caused for example the following error on a 'details' view within a py4web grid:

 File "/opt/venv/lib/python3.13/site-packages/py4web/utils/grid.py", line 734, in process
    self.form = Form(
                ~~~~^
        table,
        ^^^^^^
    ...<6 lines>...
        **attrs,
        ^^^^^^^^
    )
    ^
  File "/opt/venv/lib/python3.13/site-packages/py4web/utils/form.py", line 767, in __init__
    self.vars = self._read_vars_from_record(table)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/opt/venv/lib/python3.13/site-packages/py4web/utils/form.py", line 868, in _read_vars_from_record
    name: table[name].formatter(self.record[name])
          ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.13/site-packages/pydal/objects.py", line 2449, in formatter
    value = item.formatter(value)
  File "/opt/venv/lib/python3.13/site-packages/pydal/validators.py", line 4123, in formatter
    return ", ".join(map(quote_token, map(self.other.fomatter, value)))
                                          ^^^^^^^^^^^^^^^^^^^
AttributeError: 'IS_EMPTY_OR' object has no attribute 'fomatter'. Did you mean: 'formatter'?

@mdipierro mdipierro merged commit 15aed4e into web2py:master Mar 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants