We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85f6fa2 commit a4db997Copy full SHA for a4db997
opencti-platform/opencti-graphql/src/database/stix-converter.ts
@@ -34,6 +34,7 @@ import {
34
INPUT_SRC,
35
INPUT_SRC_PAYLOAD,
36
INPUT_VALUES,
37
+ objects,
38
RELATION_GRANTED_TO,
39
RELATION_OBJECT_MARKING
40
} from '../schema/stixRefRelationship';
@@ -163,7 +164,8 @@ export const cleanObject = <T>(data: T): T => {
163
164
const obj: T = { ...data };
165
// eslint-disable-next-line no-restricted-syntax
166
for (const key in data) {
- if (isEmptyField(obj[key])) {
167
+ // cleanup empty keys except object_refs
168
+ if (key !== objects.stixName && isEmptyField(obj[key])) {
169
delete obj[key];
170
}
171
0 commit comments