fix: validate explicit migrations and preserve large business ids
This commit is contained in:
@@ -14,7 +14,7 @@ func businessDisplayPaths(db *gorm.DB, owners map[uint]string) (map[uint][]strin
|
||||
for owner, path := range owners {
|
||||
seen := map[uint]bool{}
|
||||
for _, part := range strings.Split(path, ",") {
|
||||
id, err := strconv.ParseUint(strings.TrimSpace(part), 10, 32)
|
||||
id, err := strconv.ParseUint(strings.TrimSpace(part), 10, strconv.IntSize)
|
||||
if err == nil && id > 0 && uint(id) != owner && !seen[uint(id)] {
|
||||
paths[owner] = append(paths[owner], uint(id))
|
||||
ids[uint(id)], seen[uint(id)] = true, true
|
||||
|
||||
Reference in New Issue
Block a user