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

Undefined name: field_key #103

Open
cclauss opened this issue Dec 2, 2018 · 1 comment
Open

Undefined name: field_key #103

cclauss opened this issue Dec 2, 2018 · 1 comment

Comments

@cclauss
Copy link
Contributor

cclauss commented Dec 2, 2018

field_key is an undefined name in this context:

Should it be base_key instead?

flake8 testing of https://github.com/jazzband/django-mongonaut on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./mongonaut/forms/form_mixins.py:160:55: F821 undefined name 'field_key'
                        embedded_key_class = make_key(field_key, exclude_last_string=True)
                                                      ^
./tests/url_tests.py:47:30: E999 SyntaxError: invalid syntax
        except NoReverseMatch, e:
                             ^
1     E999 SyntaxError: invalid syntax
1     F821 undefined name 'field_key'
2
@cclauss cclauss changed the title Undefined name: Undefined name: field_key Dec 2, 2018
@garrypolley
Copy link
Collaborator

The best I can say is that field_key should probably be base_key. I looked at the commit history and that's likely been a bug for 6 years.

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

No branches or pull requests

2 participants