mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use a broader test for unset "id"
The "id" option is of type string - testing that an uninitialized "id" is specifically None is too narrow. Fixes #28339 References #28189
This commit is contained in:
parent
460a3c98cc
commit
5eef9d5067
1 changed files with 2 additions and 2 deletions
|
@ -2747,7 +2747,7 @@ def apply_minion_config(overrides=None,
|
|||
|
||||
# No ID provided. Will getfqdn save us?
|
||||
using_ip_for_id = False
|
||||
if opts['id'] is None:
|
||||
if not opts.get('id'):
|
||||
opts['id'], using_ip_for_id = get_id(
|
||||
opts,
|
||||
cache_minion_id=cache_minion_id)
|
||||
|
@ -2864,7 +2864,7 @@ def apply_master_config(overrides=None, defaults=None):
|
|||
|
||||
using_ip_for_id = False
|
||||
append_master = False
|
||||
if opts.get('id') is None:
|
||||
if not opts.get('id'):
|
||||
opts['id'], using_ip_for_id = get_id(
|
||||
opts,
|
||||
cache_minion_id=None)
|
||||
|
|
Loading…
Add table
Reference in a new issue