Skip to content

Commit

Permalink
[backend] fix internal_id being removed during observable fullsync (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyCloarec authored Jan 15, 2025
1 parent dde5551 commit e32b9ec
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ export const addStixCyberObservable = async (context, user, input) => {
return artifactImport(context, user, { ...input, ...input[graphQLType] });
}
const observableInput = {
internal_id,
stix_id,
x_opencti_score,
x_opencti_description,
Expand All @@ -216,6 +215,9 @@ export const addStixCyberObservable = async (context, user, input) => {
update,
...input[graphQLType]
};
if (internal_id) {
observableInput.internal_id = internal_id;
}
if (isNotEmptyField(payload_bin) && isNotEmptyField(url)) {
throw FunctionalError('Cannot create observable with both payload_bin and url filled.');
}
Expand Down

0 comments on commit e32b9ec

Please sign in to comment.