Skip to content

Commit 1481443

Browse files
author
Hein
committed
Fixed double .Model and .Table
1 parent cb54ec5 commit 1481443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/restheadspec/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ func (h *Handler) handleUpdate(ctx context.Context, w common.ResponseWriter, id
869869

870870
// Fetch the updated record to return the new values
871871
modelValue := reflect.New(reflect.TypeOf(model)).Interface()
872-
selectQuery := tx.NewSelect().Model(modelValue).Table(tableName).Where(fmt.Sprintf("%s = ?", common.QuoteIdent(pkName)), targetID)
872+
selectQuery := tx.NewSelect().Model(modelValue).Where(fmt.Sprintf("%s = ?", common.QuoteIdent(pkName)), targetID)
873873
if err := selectQuery.ScanModel(ctx); err != nil {
874874
return fmt.Errorf("failed to fetch updated record: %w", err)
875875
}

0 commit comments

Comments
 (0)