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 )