fix: 🐛 remove sync_interval_seconds attribute from static type
This commit is contained in:
1 parent
fa9c3d317e
commit
8f60066cc8
3 files changed
+6
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user