joestump / django-ajax

A simple framework for creating AJAX endpoints in Django.
http://github.com/joestump/django-ajax
BSD 3-Clause "New" or "Revised" License
260 stars 54 forks source link

On update(): Don't save record if nothing has changed. #62

Closed nicholasserra closed 9 years ago

nicholasserra commented 9 years ago

What's this PR do?

Currently, if you do an update on a ModelEndpoint, but only change tags, a save() is still done on the record. This patch checks for a change and only saves the record if a change has been made.

The to_python change in _extract_data was done to enable a comparison of the incoming values vs the original record.

justinabrahms commented 9 years ago

:+1: after version bump.