Skip to content

Commit

Permalink
Rename label sales_order_id to sales_order for consistency and cl…
Browse files Browse the repository at this point in the history
…arity
  • Loading branch information
HappyTetrahedron committed Dec 13, 2023
1 parent 098d8bc commit 212f243
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type ReportArgs struct {
OverrideSalesOrderID string
}

const SalesOrderIDLabel = "sales_order_id"
const SalesOrderLabel = "sales_order"

// RunRange executes prometheus queries like Run() until the `until` timestamp is reached or an error occurred.
// Returns the number of reports run and a possible error.
Expand Down Expand Up @@ -110,7 +110,7 @@ func processSample(ctx context.Context, odooClient OdooClient, args ReportArgs,
if args.OverrideSalesOrderID != "" {
salesOrderID = args.OverrideSalesOrderID
} else {
sid, err := getMetricLabel(s.Metric, SalesOrderIDLabel)
sid, err := getMetricLabel(s.Metric, SalesOrderLabel)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/report/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const promTestquery = `
),
"tenant", "my-tenant", "", ""
),
"sales_order_id", "SO00000", "", ""
"sales_order", "SO00000", "", ""
)
`
const promInvalidTestquery = `
Expand Down

0 comments on commit 212f243

Please sign in to comment.