Skip to content

Commit 5aa1bff

Browse files
committed
💫 [IMPR] Add debug log to reorder_topologies command
1 parent aa2fae5 commit 5aa1bff

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/changelog.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ CHANGELOG
55
2.101.1+dev (XXXX-XX-XX)
66
------------------------
77

8+
**Improvements**
9+
10+
- Add debug log to `reorder_topologies` command
11+
812
2.101.1 (2023-10-06)
913
------------------------
1014

1115
**Bug fixes**
1216

1317
- POI cirkwi XML endpoint is fixed (2.101.0 regression) (#3783)
1418

15-
1619
2.101.0 (2023-10-05)
1720
------------------------
1821

geotrek/core/management/commands/reorder_topologies.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def handle(self, *args, **options):
6868
""")
6969
points = cursor.fetchall()
7070
id_order = 0
71-
71+
if options['verbosity']:
72+
self.stdout.write(f'Processing topology : {topology.pk}')
7273
dict_points = {}
7374
for id_pa_point, geom_point_wkt in points:
7475
dict_points[id_pa_point] = GEOSGeometry(geom_point_wkt, srid=settings.SRID)

geotrek/core/tests/test_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def test_split_reorder_1(self):
307307
[0, 0, 1])
308308
output = StringIO()
309309
call_command('reorder_topologies', stdout=output)
310-
self.assertEqual('1 topologies has beeen updated\n', output.getvalue())
310+
self.assertEqual(f'Processing topology : {topo.pk}\n1 topologies has beeen updated\n', output.getvalue())
311311
geometries = self.get_geometries(topo)
312312
self.assertEqual(geometries, [LineString((700000, 6600000), (700045, 6600045), srid=2154),
313313
LineString((700045, 6600045), (700050, 6600050), srid=2154),

0 commit comments

Comments
 (0)