Merge pull request 'refs #6913 routeKm' (!2156) from 6913-routeKm into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2156 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
e7d5d59fa6
|
@ -30,9 +30,11 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
function validateDistance(err) {
|
||||
const routeTotalKm = this.kmEnd - this.kmStart;
|
||||
const routeMaxKm = 4000;
|
||||
if (routeTotalKm > routeMaxKm || this.kmStart > this.kmEnd)
|
||||
err();
|
||||
if (this.kmEnd) {
|
||||
const routeTotalKm = this.kmEnd - this.kmStart;
|
||||
const routeMaxKm = 4000;
|
||||
if (routeTotalKm > routeMaxKm || this.kmStart > this.kmEnd)
|
||||
err();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue