skip real estates without location in search
This commit is contained in:
@@ -21,6 +21,10 @@ const findSearchRequestsForRealEstate = async realEstate => {
|
||||
locationLong
|
||||
} = realEstate;
|
||||
|
||||
if (!locationLat || !locationLong) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const stGeometry = sequelize.fn(
|
||||
"ST_GEOMFROMTEXT",
|
||||
`POINT (${locationLong} ${locationLat})`,
|
||||
|
||||
Reference in New Issue
Block a user