Skip to content

Commit

Permalink
[Backend] Remove old modification on instance.name
Browse files Browse the repository at this point in the history
  • Loading branch information
Megafredo authored and Kedae committed Dec 1, 2023
1 parent 979a76a commit d776dd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ const StixDomainObjectHeader = (props) => {
setOpenCommitCreate(false);
setNewAlias('');
resetForm();
MESSAGING$.notifyError('You can\'t add the same alias as the name');
return;
}
if (
Expand Down
2 changes: 1 addition & 1 deletion opencti-platform/opencti-graphql/src/schema/identifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ export const generateAliasesIdsForInstance = (instance) => {
throw UnsupportedError('Cant generate alias without entity type ', { instance });
}
if (isStixObjectAliased(instance.entity_type)) {
const aliases = [...(instance.aliases || []), ...(instance.x_opencti_aliases || [])];
const aliases = [instance.name, ...(instance.aliases || []), ...(instance.x_opencti_aliases || [])];
return generateAliasesId(aliases, instance);
}
return [];
Expand Down

0 comments on commit d776dd5

Please sign in to comment.