diff --git a/termius/core/models/utils.py b/termius/core/models/utils.py index a411aff..5cb98e9 100644 --- a/termius/core/models/utils.py +++ b/termius/core/models/utils.py @@ -62,5 +62,5 @@ def reducer(self, accumulator, value): def merge_field(left, right, field): """Merge field of right instance to left one.""" left_field = getattr(left, field) - if left_field is None: + if not left_field: setattr(left, field, getattr(right, field)) diff --git a/tests/integration/info.bats b/tests/integration/info.bats index 9a6aed9..463e398 100644 --- a/tests/integration/info.bats +++ b/tests/integration/info.bats @@ -35,7 +35,7 @@ setup() { echo ${lines[*]} >&2 cat ~/.termius/storage | jq . >&2 [ "$status" -eq 0 ] - [ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=yes localhost" ] + [ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=yes root@localhost" ] } @test "info host use ssh formatter with exta options disable agent forwarding" { @@ -45,7 +45,7 @@ setup() { echo ${lines[*]} >&2 cat ~/.termius/storage | jq . >&2 [ "$status" -eq 0 ] - [ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=no localhost" ] + [ "${lines[0]}" = "ssh -p 2022 -o StrictHostKeyChecking=yes -o IdentitiesOnly=no -o ServerAliveInterval=100 -o ServerAliveCountMax=20 -o ForwardAgent=no root@localhost" ] } @test "info group use default formatter" { group=$(termius group -L test --port 2022)