Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
handle case when object is None.
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Durell committed Sep 22, 2014
1 parent 57da29e commit b410f78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mongopersist/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ def new_serial(self):

def __str__(self):
extras = [
'oid %s' % self.object._p_oid,
'class %s' % self.object.__class__.__name__,
'oid %s' % self.object._p_oid if self.object else '',
'class %s' % self.object.__class__.__name__ if self.object
else '',
'orig serial %s' % self.orig_serial,
'cur serial %s' % self.cur_serial,
'new serial %s' % self.new_serial]
Expand Down

0 comments on commit b410f78

Please sign in to comment.