Skip to content

Commit

Permalink
forces Id renewal on suggestion acceptance
Browse files Browse the repository at this point in the history
  • Loading branch information
jgadsden authored Feb 3, 2025
2 parents 9c9d95f + 6c92d0f commit 78858f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions td.vue/src/components/ThreatSuggestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ import tmActions from '@/store/actions/threatmodel.js';
import dataChanged from '@/service/x6/graph/data-changed.js';
import threatModels from '@/service/threats/models/index.js';
import { GetContextSuggestions } from '@/service/threats/oats/context-generator.js';
import { v4 } from 'uuid';
export default {
name: 'TdThreatSuggest',
computed: {
Expand Down Expand Up @@ -184,6 +185,8 @@ export default {
},
acceptSuggestion() {
const objRef = this.cellRef.data;
this.threat.number = this.threatTop + 1;
this.threat.id = v4();
if (!objRef.threatFrequency) {
const tmpfreq = threatModels.getFrequencyMapByElement(this.threat.modelType, this.cellRef.data.type);
if (tmpfreq !== null)
Expand Down

0 comments on commit 78858f0

Please sign in to comment.