Skip to content

save() method of Models does not support update_fields with non-rel backends #16

@ahmedtalhakhan

Description

@ahmedtalhakhan

Django version 1.5
Backend: Mongodb

save() call on models does not work correctly with update_fields...It still saves all the fields in a model. Looking at the code at ~/django/db/models/base.py in save_base, it seems that the param distinguishes_insert_from_update makes the code attempt inserts everytime and hence it forgets to take care of the fields specified in update_fields.. What can be the work around?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions