Add new methods to registry data model interface in prep for moving verbs to using it
This commit is contained in:
parent
7fa3506723
commit
6c5c2f1a75
9 changed files with 585 additions and 29 deletions
|
@ -336,7 +336,7 @@ def get_storage_locations(uuid):
|
|||
|
||||
def save_torrent_info(storage_object, piece_length, pieces):
|
||||
try:
|
||||
TorrentInfo.create(storage=storage_object, piece_length=piece_length, pieces=pieces)
|
||||
return TorrentInfo.create(storage=storage_object, piece_length=piece_length, pieces=pieces)
|
||||
except IntegrityError:
|
||||
# TorrentInfo already exists for this storage.
|
||||
pass
|
||||
|
|
Reference in a new issue