Merge pull request #2363 from bagerard/AttributeError_message_attr
fix py3 incompatible code
This commit is contained in:
commit
604e9974b6
@ -639,7 +639,7 @@ class Document(BaseDocument, metaclass=TopLevelDocumentMetaclass):
|
|||||||
write_concern=write_concern, _from_doc_delete=True
|
write_concern=write_concern, _from_doc_delete=True
|
||||||
)
|
)
|
||||||
except pymongo.errors.OperationFailure as err:
|
except pymongo.errors.OperationFailure as err:
|
||||||
message = "Could not delete document (%s)" % err.message
|
message = "Could not delete document (%s)" % err.args
|
||||||
raise OperationError(message)
|
raise OperationError(message)
|
||||||
signals.post_delete.send(self.__class__, document=self, **signal_kwargs)
|
signals.post_delete.send(self.__class__, document=self, **signal_kwargs)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user