# HG changeset patch # User KarstenBock@gmx.net # Date 1317131856 -7200 # Node ID d67e8288e9bfc697f02fd253e895d2029b4f2384 # Parent 5ab004fa4a2e0c6cbc8271511e1ea9d82422cfc3 Added saveable_fields to Container. diff -r 5ab004fa4a2e -r d67e8288e9bf components/container.py --- a/components/container.py Tue Sep 27 15:54:46 2011 +0200 +++ b/components/container.py Tue Sep 27 15:57:36 2011 +0200 @@ -11,6 +11,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from copy import deepcopy + from base import Base class Container(Base): @@ -21,6 +23,13 @@ def __init__(self): Base.__init__(self, children=list, max_bulk=int) + @property + def saveable_fields(self): + fields = deepcopy(self.fields) + del fields["children"] + return fields + + class BulkLimitError(Exception): """Error that gets raised when the item would exceed the