This commit is contained in:
aespin 2024-10-17 11:57:15 +02:00
parent 4ef79d4389
commit e4739d572f

View File

@ -66,7 +66,11 @@ func (s *storage) StoreProductionOrder(ctx context.Context, in *types.Production
// ConfirmBundle implements Storager. // ConfirmBundle implements Storager.
func (s *storage) ConfirmBundle(ctx context.Context, barcode string) error { func (s *storage) ConfirmBundle(ctx context.Context, barcode string) error {
return s.db.Model(&types.BundleData{}).Where("nromatricula = ?", barcode).Update("confirmed", true).Error bc := &types.Barcode{}
if err := s.db.First(&bc, barcode).Error; err != nil {
return err
}
return s.db.Model(&bc).Where("nromatricula = ?", barcode).Update("confirmed", true).Error
} }
// StoreBarcode implements IStorage. // StoreBarcode implements IStorage.