Skip to content

Commit

Permalink
[frontend] Fix start_time / stop_time when create relation in report (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Hassine committed Feb 15, 2021
1 parent 3b3dd4e commit 2480b78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ class ContainerAddStixCoreObjects extends Component {
color="secondary"
style={{ marginLeft: '10px' }}
label={t(`entity_${type}`)}
onDelete={this.onSearchTypeFilterDelete.bind(this, type)}
onDelete={
typeof this.props.onTypesChange === 'function'
? this.onSearchTypeFilterDelete.bind(this, type)
: null
}
/>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,11 @@ class StixCoreRelationshipCreation extends Component {
assoc('toId', this.props.to.id),
assoc(
'start_time',
values.start_time && values.start_time.length > 0
? parse(values.start_time).format()
: null,
values.start_time ? parse(values.start_time).format() : null,
),
assoc(
'stop_time',
values.stop_time && values.stop_time.length > 0
? parse(values.stop_time).format()
: null,
values.stop_time ? parse(values.stop_time).format() : null,
),
assoc('createdBy', values.createdBy.value),
assoc('killChainPhases', pluck('value', values.killChainPhases)),
Expand Down

0 comments on commit 2480b78

Please sign in to comment.