diff --git a/src/typeclasses/models.py b/src/typeclasses/models.py index c96b4bc93f..03d00db2ca 100644 --- a/src/typeclasses/models.py +++ b/src/typeclasses/models.py @@ -517,7 +517,7 @@ class NickHandler(AttributeHandler): class NAttributeHandler(object): """ This stand-alone handler manages non-database saving. - It is consistent with AttributeHandler and is used + It is similar to AttributeHandler and is used by the .ndb handler in the same way as .db does for the AttributeHandler. """ @@ -545,6 +545,10 @@ class NAttributeHandler(object): del self._store[key] self.obj.set_recache_protection(self._store) + def clear(self): + "Remove all nattributes from handler" + self._store = {} + def all(self, return_tuples=False): "List all keys or (keys, values) stored, except _keys" if return_tuples: