Skip to content

Commit

Permalink
Don't try to Name filter unless things are Environment compose-x#707
Browse files Browse the repository at this point in the history
  • Loading branch information
thorfi committed Nov 13, 2023
1 parent 438331b commit cc60924
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ecs_composex/ecs/ecs_family/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,9 @@ def sort_env_vars_alphabetically(self):
secret_names = frozenset()
environment = getattr(service.container_definition, "Environment")
if environment:
remove_secrets = [_env for _env in environment if _env.Name not in secret_names]
original = [_env for _env in remove_secrets if isinstance(_env, Environment)]
sorted_env = sorted(original, key=lambda x: x.Name)
original = [_env for _env in environment if isinstance(_env, Environment)]
remove_secrets = [_env for _env in original if _env.Name not in secret_names]
sorted_env = sorted(remove_secrets, key=lambda x: x.Name)
for _env in environment:
if not isinstance(_env, Environment):
sorted_env.append(_env)
Expand Down

0 comments on commit cc60924

Please sign in to comment.