Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bec_lib/bec_lib/config_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ def send_config_request(
Returns: request ID (str)

"""
if action in ["update", "add", "set"] and not config:
if action in ["update", "add"] and not config:
raise DeviceConfigError(f"Config cannot be empty for an {action} request.")
if action == "set":
config = config or {} # coerce None
RID = str(uuid.uuid4())
self.connector.send(
MessageEndpoints.device_config_request(),
Expand Down
Loading