This commit is contained in:
Youcef AOUAD committed 2024-05-24 15:59:25 +02:00
1 parent b56b8099ab
commit a633e4bccf
11 files changed
+88 -478

No files matched your search

+27 -15
View File
@@ -35,21 +35,22 @@ class OutputKpAdists(SQLSubModel):
_id_cnt = 0
def __init__(self, id: int = -1, reach = None, kp = None, title: str = "", status=None):
super(LateralContribution, self).__init__()
super(OutputKpAdists, self).__init__()
self._status = status
if id == -1:
self.id = LateralContribution._id_cnt
self.id = OutputKpAdists._id_cnt
else:
self.id = id
self._reach = reach
self._kp = kp
self._title = str(title)
self._enabled = True
LateralContribution._id_cnt = max(
LateralContribution._id_cnt + 1, self.id)
OutputKpAdists._id_cnt = max(
OutputKpAdists._id_cnt + 1, self.id)
@property
def reach(self):
@@ -110,19 +111,20 @@ class OutputKpAdists(SQLSubModel):
f"FROM OutputKpAdists"
)
for row in table:
id = row[0]
id_reach = row[1]
id_kp = row[2]
title = row[3]
if table is not None:
for row in table:
id = row[0]
id_reach = row[1]
id_kp = row[2]
title = row[3]
new_output = cls(
id=id, reach=id_reach,
kp=id_kp, title=title,
status=status
)
new_output = cls(
id=id, reach=id_reach,
kp=id_kp, title=title,
status=status
)
new.append(new_output)
new.append(new_output)
return new
@@ -141,6 +143,16 @@ class OutputKpAdists(SQLSubModel):
return True
@property
def enabled(self):
return self._enabled
@enabled.setter
def enabled(self, enabled):
self._enabled = enabled
self._status.modified()