From 70128bbdd1211ecb0035038a67416f3795a79101 Mon Sep 17 00:00:00 2001 From: Dylan Jeannin Date: Tue, 1 Sep 2026 16:31:33 +0200 Subject: [PATCH] Profiles: fix loaded profile reach reference (caused a crash during certain operations involving the profile table) --- src/Model/Geometry/Reach.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Model/Geometry/Reach.py b/src/Model/Geometry/Reach.py index cb96699e..05cf6106 100644 --- a/src/Model/Geometry/Reach.py +++ b/src/Model/Geometry/Reach.py @@ -80,11 +80,13 @@ class Reach(SQLSubModel): @classmethod def _db_load(cls, execute, data=None): new = cls(status=data["status"], parent=data["reach"]) + profile_data = data.copy() + profile_data["reach"] = new new._profiles = sorted( ProfileXYZ._db_load( execute, - data=data.copy() + data=profile_data ), key=lambda p: p._db_ind )