fix handling ancient non-decodable claims

This commit is contained in:
Jack Robison 2018-04-19 17:37:23 -04:00
parent 8b7e86e046
commit 1f1b348638
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -413,11 +413,12 @@ class Wallet(object):
@defer.inlineCallbacks @defer.inlineCallbacks
def save_claim(self, claim_info): def save_claim(self, claim_info):
if 'value' in claim_info: if 'value' in claim_info:
if claim_info['value']:
yield self.storage.save_claim(claim_info) yield self.storage.save_claim(claim_info)
else: else:
if 'certificate' in claim_info: if 'certificate' in claim_info and claim_info['certificate']['value']:
yield self.storage.save_claim(claim_info['certificate']) yield self.storage.save_claim(claim_info['certificate'])
if 'claim' in claim_info: if 'claim' in claim_info and claim_info['claim']['value']:
yield self.storage.save_claim(claim_info['claim']) yield self.storage.save_claim(claim_info['claim'])
@defer.inlineCallbacks @defer.inlineCallbacks