diff pkg/models/isrs.go @ 4060:15c9d4064f0f

AGM import: Mixed deletes with insert and updates to have them sorted by ISRS locations.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 25 Jul 2019 10:32:36 +0200
parents 4a7c2140e44b
children 1222b777f51f
line wrap: on
line diff
--- a/pkg/models/isrs.go	Thu Jul 25 09:15:53 2019 +0200
+++ b/pkg/models/isrs.go	Thu Jul 25 10:32:36 2019 +0200
@@ -44,12 +44,6 @@
 }
 
 func (isrs *Isrs) Less(other *Isrs) bool {
-	if isrs.Hectometre < other.Hectometre {
-		return true
-	}
-	if isrs.Hectometre > other.Hectometre {
-		return false
-	}
 	if isrs.CountryCode < other.CountryCode {
 		return true
 	}
@@ -71,6 +65,12 @@
 	if isrs.Orc < other.Orc {
 		return true
 	}
+	if isrs.Orc > other.Orc {
+		return false
+	}
+	if isrs.Hectometre < other.Hectometre {
+		return true
+	}
 	return false
 }