From 6067f8c001d524d29ccc4287a5f2efec90fa5004 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 22 Mar 2017 17:09:26 -0300 Subject: [feature] raise earlier when deleting None If an application tries to delete None, by accident, raising earlier would help to show the caller stack trace instead of inner sqlite backend stack and make the error more friendly. - Resolves: #8791 --- client/src/leap/soledad/client/api.py | 1 + 1 file changed, 1 insertion(+) (limited to 'client/src/leap') diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py index 23f8570e..36423e39 100644 --- a/client/src/leap/soledad/client/api.py +++ b/client/src/leap/soledad/client/api.py @@ -347,6 +347,7 @@ class Soledad(object): :return: A deferred. :rtype: twisted.internet.defer.Deferred """ + soledad_assert(doc is not None, "delete_doc doesn't accept None.") return self._defer("delete_doc", doc) def get_doc(self, doc_id, include_deleted=False): -- cgit v1.2.3