mirror of https://gitlab.com/pamhyr/pamhyr2
Profiles: fix loaded profile reach reference (caused a crash during certain operations involving the profile table)
parent
a88a164ead
commit
70128bbdd1
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue