diff --git a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py index 3ea8e776..412f937f 100644 --- a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py +++ b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py @@ -133,11 +133,17 @@ def command( # noqa: C901 # Get deployer record for all the auction winners for auction_winner in auction_winners: # TODO: Match auction winner address with provider address? - deployer_records_by_owner = laconic.webapp_deployers({"--paymentAddress": auction_winner}) + deployer_records_by_owner = laconic.webapp_deployers({"paymentAddress": auction_winner}) if len(deployer_records_by_owner) == 0: print(f"WARNING: Unable to locate deployer for auction winner {auction_winner}") - deployer_records.append(deployer_records_by_owner[0]) + # Take first record with name set + target_deployer_record = deployer_records_by_owner[0] + for r in deployer_records_by_owner: + if len(r.names) > 0: + target_deployer_record = r + break + deployer_records.append(target_deployer_record) else: deployer_record = laconic.get_record(deployer) if not deployer_record: