Permalink
Browse files

Fixed ``Resource.save_m2m`` to not clear or save when marked ``readon…

…ly=True``.
  • Loading branch information...
1 parent ad196ce commit fc699d3ac837f735eb099f253ddf2fcb82a89cee @cyberdelia cyberdelia committed with toastdriven Jun 27, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 tastypie/resources.py
View
@@ -1740,6 +1740,9 @@ def save_m2m(self, bundle):
if not field_object.attribute:
continue
+
+ if field_object.readonly:
+ continue
# Get the manager.
related_mngr = getattr(bundle.obj, field_object.attribute)

0 comments on commit fc699d3

Please sign in to comment.