Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<lambda>() missing 1 required positional argument: 'record' #762

Closed
vmsp opened this issue Aug 5, 2020 · 1 comment · Fixed by #774
Closed

<lambda>() missing 1 required positional argument: 'record' #762

vmsp opened this issue Aug 5, 2020 · 1 comment · Fixed by #774

Comments

@vmsp
Copy link

vmsp commented Aug 5, 2020

class MyTable(tables.Table):
    my_column = tables.CheckBoxColumn(
        attrs={'input': {
            'ic-post-to': lambda record: record.pk
        }},
        checked=lambda value, _: value,
    )

gives <lambda>() missing 1 required positional argument: 'record'

class MyTable(tables.Table):
    my_column = tables.CheckBoxColumn(
        attrs={'td': {
            'ic-post-to': lambda record: record.pk
        }},
        checked=lambda value, _: value,
    )

works fine.

@jieter
Copy link
Owner

jieter commented Oct 15, 2020

I see that the <input> attrs do not get optional arguments. Let's see if that can be easily fixed.

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 a pull request may close this issue.

2 participants