forked from LBRYCommunity/lbry-sdk
fix database error when updating a claim that we don't have a file for (https://github.com/lbryio/lbry/issues/1165)
This commit is contained in:
parent
e83ff47722
commit
c26816c92d
2 changed files with 5 additions and 2 deletions
|
@ -16,6 +16,7 @@ at anytime.
|
||||||
* fixed token validation error when the dht node has just been started (https://github.com/lbryio/lbry/issues/1248)
|
* fixed token validation error when the dht node has just been started (https://github.com/lbryio/lbry/issues/1248)
|
||||||
* fixed a race condition when inserting a blob into the database (https://github.com/lbryio/lbry/issues/1129)
|
* fixed a race condition when inserting a blob into the database (https://github.com/lbryio/lbry/issues/1129)
|
||||||
* reflector server incorrectly responding as if it has all the blobs for a stream that was only partially uploaded to it
|
* reflector server incorrectly responding as if it has all the blobs for a stream that was only partially uploaded to it
|
||||||
|
* `publish` raising a database error when updating a claim that we don't have a file for (https://github.com/lbryio/lbry/issues/1165)
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
*
|
*
|
||||||
|
|
|
@ -59,7 +59,9 @@ class Publisher(object):
|
||||||
def publish_stream(self, name, bid, claim_dict, stream_hash, claim_address=None, change_address=None):
|
def publish_stream(self, name, bid, claim_dict, stream_hash, claim_address=None, change_address=None):
|
||||||
"""Make a claim without creating a lbry file"""
|
"""Make a claim without creating a lbry file"""
|
||||||
claim_out = yield self.make_claim(name, bid, claim_dict, claim_address, change_address)
|
claim_out = yield self.make_claim(name, bid, claim_dict, claim_address, change_address)
|
||||||
yield self.session.storage.save_content_claim(stream_hash, "%s:%i" % (claim_out['txid'], claim_out['nout']))
|
if stream_hash: # the stream_hash returned from the db will be None if this isn't a stream we have
|
||||||
|
yield self.session.storage.save_content_claim(stream_hash, "%s:%i" % (claim_out['txid'],
|
||||||
|
claim_out['nout']))
|
||||||
self.lbry_file = [f for f in self.lbry_file_manager.lbry_files if f.stream_hash == stream_hash][0]
|
self.lbry_file = [f for f in self.lbry_file_manager.lbry_files if f.stream_hash == stream_hash][0]
|
||||||
defer.returnValue(claim_out)
|
defer.returnValue(claim_out)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue