fix: 🐛 remove sync_interval_seconds attribute from static type

This commit is contained in:
dharini committed 2022-03-03 14:17:11 -08:00
1 parent fa9c3d317e
commit 8f60066cc8
3 files changed
+6 -3

No files matched your search

+1
View File
@@ -55,6 +55,7 @@ export default class HostSetSerializer extends ApplicationSerializer {
// Delete unnecessary fields for static type
delete serialized.attributes;
delete serialized.preferred_endpoints;
delete serialized.sync_interval_seconds;
return serialized;
}
+5 -1
View File
@@ -29,7 +29,11 @@ export default factory.extend({
return result;
}
},
sync_interval_seconds: () => datatype.number(),
sync_interval_seconds() {
if (this.type === 'plugin') {
return datatype.number();
}
},
// AWS specific
filters() {
if (this.plugin?.name === 'aws') {
@@ -12,14 +12,12 @@ module('Unit | Serializer | host set', function (hooks) {
compositeType: 'static',
description: 'Description',
host_catalog_id: '123',
sync_interval_seconds: 1,
version: 1,
});
assert.deepEqual(record.serialize(), {
name: 'Host Set 1',
description: 'Description',
host_catalog_id: '123',
sync_interval_seconds: 1,
version: 1,
});
});