mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-27 14:18:35 +00:00
initialize CSV Importer
This commit is contained in:
parent
1ab7435bf1
commit
a903880f82
12 changed files with 600 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue