Skip to content

Commit 5fe5179

Browse files
authored
Merge pull request #74 from aisa-it/fix/parentIssue
fix parent issue
2 parents abe159e + 6d2c909 commit 5fe5179

File tree

1 file changed

+7
-1
lines changed
  • aiplan.go/internal/aiplan/activity-tracker

1 file changed

+7
-1
lines changed

aiplan.go/internal/aiplan/activity-tracker/update.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,14 @@ func issueParentUpdate[E dao.Entity, A dao.Activity](tracker *ActivitiesTracker,
669669
}
670670

671671
var newParentId uuid.UUID
672+
var oldParentId uuid.NullUUID
672673

673-
oldParentId := currentInstance[field].(uuid.NullUUID)
674+
if v, exist := currentInstance[field]; exist {
675+
switch val := v.(type) {
676+
case uuid.NullUUID:
677+
oldParentId = val
678+
}
679+
}
674680

675681
if v, exists := requestedData[field]; exists {
676682
switch val := v.(type) {

0 commit comments

Comments
 (0)