Profiles: fix loaded profile reach reference (caused a crash during certain operations involving the profile table)

This commit is contained in:
Dylan Jeannin committed 2026-09-01 16:31:33 +02:00
1 parent a88a164ead
commit 70128bbdd1
1 file changed
+3 -1
+3 -1
View File
@@ -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
)