Skip to content

Commit

Permalink
[api/front] Handle more hidden menus / deepscan unused variable issue
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-julien committed Aug 30, 2022
1 parent 4be3c32 commit e892801
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ class Root extends Component {
redirect = 'cities';
} else if (!helper.isEntityTypeHidden('Position')) {
redirect = 'positions';
} else if (!helper.isEntityTypeHidden('Event')) {
redirect = 'events';
} else if (!helper.isEntityTypeHidden('Organization')) {
redirect = 'organizations';
} else if (!helper.isEntityTypeHidden('System')) {
redirect = 'systems';
}
return (
<Switch>
Expand Down
4 changes: 2 additions & 2 deletions opencti-platform/opencti-graphql/src/manager/taskManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const executeEnrichment = async (user, context, element) => {
await askElementEnrichmentForConnector(user, element.internal_id, connector.internal_id);
}, { concurrency: ES_MAX_CONCURRENCY });
};
const executePromote = async (user, context, element) => {
const executePromote = async (user, element) => {
// If indicator, promote to observable
if (element.entity_type === ENTITY_TYPE_INDICATOR) {
await promoteIndicatorToObservable(user, element.internal_id);
Expand Down Expand Up @@ -314,7 +314,7 @@ const executeProcessing = async (user, processingElements) => {
await executeMerge(user, context, element);
}
if (type === ACTION_TYPE_PROMOTE) {
await executePromote(user, context, element);
await executePromote(user, element);
}
if (type === ACTION_TYPE_ENRICHMENT) {
await executeEnrichment(user, context, element);
Expand Down

0 comments on commit e892801

Please sign in to comment.