Steps to reproduce
- Register a firewall with the cloud backup service.
- Ensure the account has zero backups stored remotely.
- Call:
api-cli ns.backup registered-list-backups
- Then create at least one backup and call the same method again.
Expected behavior
values always has the same shape: {"backups": [...]}, whether the list is empty or not.
Actual behavior
When backups exist:
{"values": {"backups": [{"id": "...", "name": "...", "created": ..., "size": ..., "mimetype": "..."}]}}
When no backups exist:
Callers checking for a backups key (or iterating values.backups) break on the empty case since values is a bare array instead of an object.
Components
ns-api 3.7.1 (ns.backup)
nethsecurity-ui 2.23.2
Steps to reproduce
Expected behavior
valuesalways has the same shape:{"backups": [...]}, whether the list is empty or not.Actual behavior
When backups exist:
{"values": {"backups": [{"id": "...", "name": "...", "created": ..., "size": ..., "mimetype": "..."}]}}When no backups exist:
{"values": []}Callers checking for a
backupskey (or iteratingvalues.backups) break on the empty case sincevaluesis a bare array instead of an object.Components
ns-api 3.7.1 (
ns.backup)nethsecurity-ui 2.23.2