mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Profiles: fix loaded profile reach reference (caused a crash during certain operations involving the profile table)
This commit is contained in:
1 parent
a88a164ead
commit
70128bbdd1
1 file changed
+3
-1
@@ -80,11 +80,13 @@ class Reach(SQLSubModel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def _db_load(cls, execute, data=None):
|
def _db_load(cls, execute, data=None):
|
||||||
new = cls(status=data["status"], parent=data["reach"])
|
new = cls(status=data["status"], parent=data["reach"])
|
||||||
|
profile_data = data.copy()
|
||||||
|
profile_data["reach"] = new
|
||||||
|
|
||||||
new._profiles = sorted(
|
new._profiles = sorted(
|
||||||
ProfileXYZ._db_load(
|
ProfileXYZ._db_load(
|
||||||
execute,
|
execute,
|
||||||
data=data.copy()
|
data=profile_data
|
||||||
),
|
),
|
||||||
key=lambda p: p._db_ind
|
key=lambda p: p._db_ind
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user