chore: update id order
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"gestion/db"
|
||||
"gestion/services"
|
||||
"log"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -57,14 +58,10 @@ func processAutoAssignmentWithPriority(database *db.Database, geoService *servic
|
||||
skippedCount := 0
|
||||
|
||||
for i, cmd := range commands {
|
||||
commandID, ok := cmd["id"].(int)
|
||||
if !ok {
|
||||
if idFloat, ok := cmd["id"].(float64); ok {
|
||||
commandID = int(idFloat)
|
||||
} else {
|
||||
skippedCount++
|
||||
continue
|
||||
}
|
||||
commandID, _ := strconv.Atoi(fmt.Sprintf("%v", cmd["id"]))
|
||||
if commandID == 0 {
|
||||
skippedCount++
|
||||
continue
|
||||
}
|
||||
|
||||
// Log la position dans la queue de priorité
|
||||
|
||||
Reference in New Issue
Block a user