mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix bug: crash, if only one lamp ID is passed
This commit is contained in:
parent
c0e6706d9a
commit
1e508e9155
@ -129,7 +129,8 @@ def _get_devices(params):
|
||||
if 'id' not in params:
|
||||
raise CommandExecutionError("Parameter ID is required.")
|
||||
|
||||
return [int(dev) for dev in params['id'].split(",")]
|
||||
return type(params['id']) == int and [params['id']] \
|
||||
or [int(dev) for dev in params['id'].split(",")]
|
||||
|
||||
|
||||
# Callers
|
||||
|
Loading…
Reference in New Issue
Block a user