fix
This commit is contained in:
@@ -21,6 +21,7 @@ var (
|
||||
v1BreakTagRe = regexp.MustCompile(`(?i)<br\s*/?>`)
|
||||
v1BlockEndRe = regexp.MustCompile(`(?i)</(p|div|li|h[1-6]|tr)>`)
|
||||
)
|
||||
|
||||
// ParseV1ProcessingType mirrors legacy parseV1ProcessingTypeFromBody.
|
||||
// Accepts string ("full" / step), JSON array of steps, or nil (defaults to full).
|
||||
func ParseV1ProcessingType(raw any) (storageValue string, responseValue any, err error) {
|
||||
@@ -311,6 +312,16 @@ func (p *Pipeline) LoadV1ProcessJobItems(ctx context.Context, companyID, jobID u
|
||||
if catStr == "" {
|
||||
catStr = categoryUniqueIDFromMaps(mapped, rawData)
|
||||
}
|
||||
// Coerce display names → taxonomy unique_id (same as processOne / d161b28).
|
||||
if catStr != "" && len(categoryNames) > 0 {
|
||||
valid := make(map[string]struct{}, len(categoryNames))
|
||||
for uid := range categoryNames {
|
||||
valid[uid] = struct{}{}
|
||||
}
|
||||
if resolved := resolveCompanyCategoryUniqueID(catStr, categoryNames, valid); resolved != "" {
|
||||
catStr = resolved
|
||||
}
|
||||
}
|
||||
if catNameStr == "" && catStr != "" {
|
||||
if name, ok := categoryNames[catStr]; ok && name != "" {
|
||||
catNameStr = name
|
||||
|
||||
Reference in New Issue
Block a user