FIXES #368: parse depends_on of type dict

This commit is contained in:
Muayyad alsadi 2021-12-09 16:18:52 +02:00
parent 30cfe2317c
commit 85244272ff

View File

@ -772,7 +772,8 @@ def flat_deps(services, with_extends=False):
if ext != name: deps.add(ext) if ext != name: deps.add(ext)
continue continue
deps_ls = srv.get("depends_on", None) or [] deps_ls = srv.get("depends_on", None) or []
if not is_list(deps_ls): deps_ls=[deps_ls] if is_str(deps_ls): deps_ls=[deps_ls]
elif is_dict(deps_ls): deps_ls=list(deps_ls.keys())
deps.update(deps_ls) deps.update(deps_ls)
# parse link to get service name and remove alias # parse link to get service name and remove alias
links_ls = srv.get("links", None) or [] links_ls = srv.get("links", None) or []