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
Update __init__.py #13
Conversation
Fixed this error, caused by performing string manipulation on a function: ``` related_admin/__init__.py", line 69, in __new__ if '__' in field[1:-1] and not hasattr(new_class, field): TypeError: 'function' object is not subscriptable ``` `list_display` can also contain `functions`. Added check that fields in `list_display` are only strings.
Fixed this error, caused by performing string manipulation on a function:
|
4 similar comments
@prakhar-goel Thank you very much for the fix. Can you please add test for this error? |
Hi @PetrDlouhy, did you get a chance to approve the pull request please? |
Ok just saw your previous comment regarding tests. I ain't a pro at writing tests. Can you please guide me. |
I have reworked this and write the test. So I am closing the PR. |
Fixed this error, caused by performing string manipulation on a function:
list_display
can also containfunctions
. Added check that fields inlist_display
are only strings.