From b3784b7bb4db30629492148edc8d7a0691088a01 Mon Sep 17 00:00:00 2001
From: esikkala <esko.ikkala@aalto.fi>
Date: Mon, 25 Jan 2021 17:29:47 +0200
Subject: [PATCH] Migrations: ignore equivalent start and end

---
 .../sparql/sampo/sparql_queries/SparqlQueriesPerspective1.js   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/server/sparql/sampo/sparql_queries/SparqlQueriesPerspective1.js b/src/server/sparql/sampo/sparql_queries/SparqlQueriesPerspective1.js
index b2b9958a..b6ae656a 100644
--- a/src/server/sparql/sampo/sparql_queries/SparqlQueriesPerspective1.js
+++ b/src/server/sparql/sampo/sparql_queries/SparqlQueriesPerspective1.js
@@ -507,7 +507,8 @@ export const migrationsQuery = `
             geo:lat ?to__lat ;
             geo:long ?to__long .
     BIND(CONCAT("/places/page/", REPLACE(STR(?to__id), "^.*\\\\/(.+)", "$1")) AS ?to__dataProviderUrl)
-    BIND(IRI(CONCAT(STR(?from__id), "-", REPLACE(STR(?to__id), "http://ldf.fi/yoma/place/", ""))) as ?id)
+    BIND(IRI(CONCAT(STR(?from__id), "-", REPLACE(STR(?to__id), "http://ldf.fi/mmm/place/", ""))) as ?id)
+    FILTER(?from__id != ?to__id)
   }
   GROUP BY ?id 
   ?from__id ?from__prefLabel ?from__lat ?from__long ?from__dataProviderUrl
-- 
GitLab