Add new methods to registry data model interface in prep for moving verbs to using it

This commit is contained in:
Joseph Schorr 2018-08-28 13:02:26 -04:00
parent 7fa3506723
commit 6c5c2f1a75
9 changed files with 585 additions and 29 deletions

View file

@ -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