Skip to content

Commit 3226b30

Browse files
fix
1 parent 3702dc8 commit 3226b30

File tree

1 file changed

+3
-13
lines changed
  • cmd/ctrlc/root/sync/salesforce/common

1 file changed

+3
-13
lines changed

cmd/ctrlc/root/sync/salesforce/common/util.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,9 @@ func buildSOQL(objectName string, fields []string, whereClause string, lastId st
121121
if whereClause != "" {
122122
conditions = append(conditions, whereClause)
123123
}
124-
if lastId != "" {
125-
// Reject anything that isn’t exactly 15 or 18 alphanumeric chars
126-
if len(lastId) != 15 && len(lastId) != 18 {
127-
return "", fmt.Errorf("invalid Salesforce ID: %q", lastId)
128-
}
129-
for i := range lastId {
130-
c := lastId[i]
131-
if !((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
132-
return "", fmt.Errorf("invalid Salesforce ID: %q", lastId)
133-
}
134-
}
135-
conditions = append(conditions, fmt.Sprintf("Id > '%s'", lastId))
136-
}
124+
if lastId != "" {
125+
conditions = append(conditions, fmt.Sprintf("Id > '%s'", lastId))
126+
}
137127
if len(conditions) > 0 {
138128
query += " WHERE " + strings.Join(conditions, " AND ")
139129
}

0 commit comments

Comments
 (0)