|
|
@@ -763,7 +763,7 @@ export class TaskService implements OnModuleInit {
|
|
|
const res = tasks.map((task) => {
|
|
|
return {
|
|
|
task,
|
|
|
- useCountry: task.country ? ['any'] : countryMapping[task.country] || ['any'],
|
|
|
+ useCountry: task.country ? countryMapping[task.country] || ['any'] : ['any'],
|
|
|
devices: []
|
|
|
}
|
|
|
})
|
|
|
@@ -772,11 +772,14 @@ export class TaskService implements OnModuleInit {
|
|
|
let candidateTasks
|
|
|
if (device.matchCountry) {
|
|
|
candidateTasks = res.filter((r) => {
|
|
|
- return r.useCountry.includes(device.pinCountry)
|
|
|
+ return r.useCountry.includes(device.pinCountry.toUpperCase())
|
|
|
})
|
|
|
} else {
|
|
|
candidateTasks = res.filter((r) => {
|
|
|
- return r.useCountry.includes('any') || r.useCountry.includes(device.currentCountry)
|
|
|
+ return (
|
|
|
+ r.useCountry.includes('any') ||
|
|
|
+ r.useCountry.includes(device.currentCountry.toUpperCase())
|
|
|
+ )
|
|
|
})
|
|
|
}
|
|
|
if (candidateTasks.length > 0) {
|