diff options
Diffstat (limited to 'service/pixelated/adapter')
-rw-r--r-- | service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py b/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py index 05d32779..8a912bc2 100644 --- a/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py +++ b/service/pixelated/adapter/soledad/soledad_search_key_masterkey_retrieval_mixin.py @@ -21,7 +21,11 @@ import base64 class SoledadSearchIndexMasterkeyRetrievalMixin(SoledadDbFacadeMixin, object): def get_index_masterkey(self): - result = self.get_search_index_masterkey() + deferred = self.get_search_index_masterkey() + deferred.addCallback(self._ensure_masterkey_exists) + return deferred + + def _ensure_masterkey_exists(self, result): index_key_doc = result[0] if result else None if not index_key_doc: |