Fixes cascading saves with filefields

fixes #24 #25
This commit is contained in:
Ross Lawley
2012-06-18 16:45:14 +01:00
parent e4bc92235d
commit 89a6eee6af
3 changed files with 14 additions and 3 deletions

View File

@@ -889,6 +889,13 @@ class GridFSProxy(object):
self_dict['_fs'] = None
return self_dict
def __repr__(self):
return '<%s: %s>' % (self.__class__.__name__, self.grid_id)
def __cmp__(self, other):
return cmp((self.grid_id, self.collection_name, self.db_alias),
(other.grid_id, other.collection_name, other.db_alias))
@property
def fs(self):
if not self._fs: