fix: 🐛 handle missing host_ids array in host sets
This commit is contained in:
3 files changed
+39
-2
No files matched your search
@@ -12,8 +12,10 @@ export default ApplicationSerializer.extend({
|
||||
|
||||
_hashForModel(model) {
|
||||
const json = ApplicationSerializer.prototype._hashForModel.apply(this, arguments);
|
||||
json.host_ids = model.hostIds;
|
||||
json.host_catalog_id = model.hostCatalogId;
|
||||
if (model.hostIds?.length) {
|
||||
json.host_ids = model.hostIds;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user