Skip to content

Commit

Permalink
[backend] fix background tasks with filters (#4939)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archidoit committed Feb 20, 2024
1 parent 5dd11f8 commit 6a9b466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class StixCoreRelationshipsExportCreationComponent extends Component {
return (
<UserContext.Consumer>
{({ schema }) => {
const availableFilterKeys = Array.from(schema.filterKeysSchema.get('Stix-Core-Object')?.keys() ?? []);
const availableFilterKeys = Array.from(schema.filterKeysSchema.get('Stix-Core-Object')?.keys() ?? []).concat(['entity_type']);
return (
<ExportContext.Consumer>
{({ selectedIds }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,12 @@ class ToolBar extends Component {
&& selectedTypes.length > 0
&& selectedTypes.every((type) => promotionTypes.includes(type));
const promoteDisable = !isManualPromoteSelect && !promotionTypesFiltered;
const availableFilterKeys = Array.from(schema.filterKeysSchema.get('Basic-Object')?.keys ?? []);
const filterKeysMap = new Map();
entityTypeFilterValues.forEach((entityType) => {
const currentMap = schema.filterKeysSchema.get(entityType);
currentMap?.forEach((value, key) => filterKeysMap.set(key, value));
});
const availableFilterKeys = Array.from(filterKeysMap.keys() ?? []).concat(['entity_type']);
// endregion
return (
<Drawer
Expand Down

0 comments on commit 6a9b466

Please sign in to comment.