-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 [BUG] Fix schema_randonnee parser url update issues (#4022)
- fix url being duplicated in description after new import if description is null or was not updated - add static method to find url in description to help other parsers find it
- Loading branch information
1 parent
e6096d7
commit 8fd0b01
Showing
6 changed files
with
154 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...rek/trekking/tests/data/schema_randonnee_parser/find_url_in_description.geojson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "sql_statement", | ||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"id_local": "1", | ||
"producteur": "Producer 1", | ||
"url": "https://test.com", | ||
"nom_itineraire": "Trek 1", | ||
"pratique": "pédestre", | ||
"depart": "Departure 1", | ||
"arrivee": "Arrival 1", | ||
"instructions": "Instructions 1" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ [ 6.449592517966364, 44.733424655086957 ], [ 6.449539623508488, 44.733394939411369 ] ] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"id_local": "2", | ||
"producteur": "Producer 1", | ||
"nom_itineraire": "Trek 1", | ||
"pratique": "pédestre", | ||
"depart": "Departure 1", | ||
"arrivee": "Arrival 1", | ||
"instructions": "Instructions 2" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ [ 6.449592517966364, 44.733424655086957 ], [ 6.449539623508488, 44.733394939411369 ] ] | ||
} | ||
} | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
geotrek/trekking/tests/data/schema_randonnee_parser/update_url_after.geojson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "sql_statement", | ||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"id_local": "1", | ||
"producteur": "Producer 1", | ||
"url": "https://test.com", | ||
"nom_itineraire": "Trek 1", | ||
"pratique": "pédestre", | ||
"depart": "Departure 1", | ||
"arrivee": "Arrival 1", | ||
"instructions": null | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ [ 6.449592517966364, 44.733424655086957 ], [ 6.449539623508488, 44.733394939411369 ] ] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"id_local": "2", | ||
"producteur": "Producer 1", | ||
"url": "https://test2.com", | ||
"nom_itineraire": "Trek 2", | ||
"pratique": "pédestre", | ||
"depart": "Departure 1", | ||
"arrivee": "Arrival 1", | ||
"instructions": "Instructions 2" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ [ 6.449592517966364, 44.733424655086957 ], [ 6.449539623508488, 44.733394939411369 ] ] | ||
} | ||
} | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
geotrek/trekking/tests/data/schema_randonnee_parser/update_url_before.geojson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "sql_statement", | ||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"id_local": "1", | ||
"producteur": "Producer 1", | ||
"url": "https://test.com", | ||
"nom_itineraire": "Trek 1", | ||
"pratique": "pédestre", | ||
"depart": "Departure 1", | ||
"arrivee": "Arrival 1", | ||
"instructions": "Instructions 1" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ [ 6.449592517966364, 44.733424655086957 ], [ 6.449539623508488, 44.733394939411369 ] ] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"id_local": "2", | ||
"producteur": "Producer 1", | ||
"url": "https://test1.com", | ||
"nom_itineraire": "Trek 2", | ||
"pratique": "pédestre", | ||
"depart": "Departure 1", | ||
"arrivee": "Arrival 1", | ||
"instructions": "Instructions 2" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ [ 6.449592517966364, 44.733424655086957 ], [ 6.449539623508488, 44.733394939411369 ] ] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters