don't try to delete the stream terminator from the blob table when deleting a stream

This commit is contained in:
Jack Robison 2018-03-15 17:44:54 -04:00
parent 8af96a0c51
commit 0313f857ba
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -376,7 +376,7 @@ class SQLiteStorage(object):
def delete_stream(self, stream_hash): def delete_stream(self, stream_hash):
sd_hash = yield self.get_sd_blob_hash_for_stream(stream_hash) sd_hash = yield self.get_sd_blob_hash_for_stream(stream_hash)
stream_blobs = yield self.get_blobs_for_stream(stream_hash) stream_blobs = yield self.get_blobs_for_stream(stream_hash)
blob_hashes = [b.blob_hash for b in stream_blobs] blob_hashes = [b.blob_hash for b in stream_blobs if b.blob_hash is not None]
def _delete_stream(transaction): def _delete_stream(transaction):
transaction.execute("delete from content_claim where stream_hash=? ", (stream_hash,)) transaction.execute("delete from content_claim where stream_hash=? ", (stream_hash,))