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

Key argument to _get_changed_fields is unused. #347

Closed
amcgregor opened this issue May 29, 2013 · 2 comments
Closed

Key argument to _get_changed_fields is unused. #347

amcgregor opened this issue May 29, 2013 · 2 comments
Milestone

Comments

@amcgregor
Copy link
Contributor

In mongoengine/base/document.py line 394:

def _get_changed_fields(self, key='', inspected=None):

The only occurrences of assignment when calling is within that function on line 425:

changed = field._get_changed_fields(key, inspected)

And 439:

changed = value._get_changed_fields(list_key, inspected)

However it is never used within that function or passed to any other. In fact, it is overridden, unused, if execution reaches line 415, which is always executed before either instance of use:

key = '%s.' % db_field_name

And is thus just pointless data being thrown around, unless I'm missing something that may be glaringly obvious. ;)

@rozza
Copy link
Contributor

rozza commented Jun 3, 2013

hmm - probably some old cruft that needs cleaning up - will have a look for 0.8.2

@rozza
Copy link
Contributor

rozza commented Jun 4, 2013

good spot! Removed :)

@rozza rozza closed this as completed Jun 4, 2013
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