initialize CSV Importer

This commit is contained in:
Hayden 2022-09-06 11:15:07 -08:00
parent 1ab7435bf1
commit a903880f82
12 changed files with 600 additions and 5 deletions

View file

@ -72,10 +72,6 @@ func (e *ItemsRepository) Update(ctx context.Context, data types.ItemUpdate) (*e
SetSoldNotes(data.SoldNotes).
SetNotes(data.Notes)
if data.LabelIDs != nil && len(data.LabelIDs) > 0 {
q.AddLabelIDs(data.LabelIDs...)
}
err := q.Exec(ctx)
if err != nil {

View file

@ -78,6 +78,10 @@ func (r *LocationRepository) Create(ctx context.Context, groupdId uuid.UUID, dat
SetGroupID(groupdId).
Save(ctx)
if err != nil {
return nil, err
}
location.Edges.Group = &ent.Group{ID: groupdId} // bootstrap group ID
return location, err
}