set scale default to 1 on deploy

Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
aiordache 2020-08-17 11:59:23 +02:00
parent 096d938bac
commit d773719060
1 changed files with 2 additions and 0 deletions

View File

@ -318,6 +318,8 @@ class Project:
)
if replicas:
scale = replicas
if scale is None:
return 1
# deploy may contain placement constraints introduced in v3.8
max_replicas = deploy_dict.get('placement', {}).get(
'max_replicas_per_node',