Cross check app in deployment request and auction record
This commit is contained in:
parent
ca903b55be
commit
78874a4d7f
@ -109,6 +109,16 @@ def command( # noqa: C901
|
|||||||
auction = None
|
auction = None
|
||||||
auction_winners = None
|
auction_winners = None
|
||||||
if auction_id:
|
if auction_id:
|
||||||
|
# Fetch auction record for given auction
|
||||||
|
auction_records_by_id = laconic.app_deployment_auctions({"auction": auction_id})
|
||||||
|
if len(auction_records_by_id) == 0:
|
||||||
|
fatal(f"Unable to locate record for auction: {auction_id}")
|
||||||
|
|
||||||
|
# Cross check app against application in the auction record
|
||||||
|
auction_app = auction_records_by_id[0].attributes.application
|
||||||
|
if auction_app != app:
|
||||||
|
fatal(f"Requested application {app} does not match application from auction record {auction_app}")
|
||||||
|
|
||||||
# Fetch auction details
|
# Fetch auction details
|
||||||
auction = laconic.get_auction(auction_id)
|
auction = laconic.get_auction(auction_id)
|
||||||
if not auction:
|
if not auction:
|
||||||
|
Loading…
Reference in New Issue
Block a user