mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 16:57:39 -05:00
small bug fix
This commit is contained in:
@@ -104,13 +104,14 @@ async function build_filter(filter_type, code, start_time, direction, shortName,
|
||||
}
|
||||
|
||||
const group = await Group.findOne({ 'shortName': shortName, '_id': ObjectId.createFromHexString(code) }).exec();
|
||||
if (!group) {
|
||||
if (!group || !group.talkgroups) {
|
||||
console.warn("[" + shortName + "] Error - build_filter() group is null ");
|
||||
res.contentType('json');
|
||||
res.status(404);
|
||||
res.send(JSON.stringify({
|
||||
message: 'That Group ID doesnt exist.'
|
||||
}));
|
||||
return;
|
||||
}
|
||||
filter.talkgroupNum = {
|
||||
$in: group.talkgroups
|
||||
|
||||
Reference in New Issue
Block a user