Skip to content

Commit

Permalink
its better to define Factids
Browse files Browse the repository at this point in the history
  • Loading branch information
SchawnnDev committed Nov 22, 2023
1 parent 866595a commit 19537ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internals/export/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@ type Wrapper struct {

// NewWrapperItem creates a new export wrapper item
func NewWrapperItem(facts []engine.Fact, fileName string, params CSVParameters, user users.User) *WrapperItem {
var factIDs []int64
for _, fact := range facts {
factIDs = append(factIDs, fact.ID)
}
return &WrapperItem{
Users: append([]string{}, user.Login),
Id: uuid.New().String(),
Facts: facts,
FactIDs: factIDs,
Date: time.Now(),
Status: StatusPending,
Error: nil,
Expand Down

0 comments on commit 19537ef

Please sign in to comment.