Fix #595: Support += and *= for ListField

This commit is contained in:
David Bordeynik
2015-03-29 09:28:26 +03:00
parent cbd2a44350
commit de0e5583a5
3 changed files with 24 additions and 0 deletions

View File

@@ -156,6 +156,14 @@ class BaseList(list):
self = state
return self
def __iadd__(self, other):
self._mark_as_changed()
return super(BaseList, self).__iadd__(other)
def __imul__(self, other):
self._mark_as_changed()
return super(BaseList, self).__imul__(other)
def append(self, *args, **kwargs):
self._mark_as_changed()
return super(BaseList, self).append(*args, **kwargs)