mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Pamhyr: Fix tests and update adists obj id management.
This commit is contained in:
1 parent
b154e3d03b
commit
f0ac170d2f
11 files changed
+50
-84
No files matched your search
@@ -35,16 +35,15 @@ class Pollutants(SQLSubModel):
|
||||
_sub_classes = []
|
||||
_id_cnt = 0
|
||||
|
||||
def __init__(self, id: int = -1, name: str = "", status=None):
|
||||
super(Pollutants, self).__init__()
|
||||
def __init__(self, id: int = -1, name: str = "",
|
||||
status=None,
|
||||
owner_scenario=-1):
|
||||
super(Pollutants, self).__init__(
|
||||
id=id, status=status,
|
||||
owner_scenario=owner_scenario)
|
||||
|
||||
self._status = status
|
||||
|
||||
if id == -1:
|
||||
self.id = Pollutants._id_cnt
|
||||
else:
|
||||
self.id = id
|
||||
|
||||
if name is None or name == "":
|
||||
self.name = f"pol{self.id}"
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user