fix bug where forgetting outdated node positions updated the updated_at column when the node never had a position

This commit is contained in:
liamcottle
2024-12-12 14:14:20 +13:00
parent 24556746e0
commit ac10e81343

View File

@ -584,6 +584,13 @@ async function forgetOutdatedNodePositions() {
// position_updated_at before x seconds ago // position_updated_at before x seconds ago
lt: new Date(Date.now() - forgetOutdatedNodePositionsAfterSeconds * 1000), lt: new Date(Date.now() - forgetOutdatedNodePositionsAfterSeconds * 1000),
}, },
// don't forget outdated node positions for nodes that don't actually have a position set
// otherwise the updated_at is updated, when nothing changed
NOT: {
latitude: null,
longitude: null,
altitude: null,
},
}, },
data: { data: {
latitude: null, latitude: null,