mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Model, SQL: Some minor change for bug fix in SQL export/load.
This commit is contained in:
1 parent
8ca1ac8fcf
commit
1b9115ef87
3 files changed
+6
-4
No files matched your search
@@ -16,7 +16,7 @@ class BoundaryCondition(SQLSubModel):
|
||||
self._status = status
|
||||
|
||||
if id == -1:
|
||||
self.id = type(self)._id_cnt
|
||||
self.id = BoundaryCondition._id_cnt
|
||||
else:
|
||||
self.id = id
|
||||
|
||||
@@ -27,7 +27,7 @@ class BoundaryCondition(SQLSubModel):
|
||||
self._header = []
|
||||
self._types = [float, float]
|
||||
|
||||
type(self)._id_cnt = max(type(self)._id_cnt + 1, self.id)
|
||||
BoundaryCondition._id_cnt = max(BoundaryCondition._id_cnt + 1, self.id)
|
||||
|
||||
@classmethod
|
||||
def _sql_create(cls, execute):
|
||||
|
||||
@@ -122,6 +122,8 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||
data = {}
|
||||
data["profile"] = self.id
|
||||
|
||||
execute(f"DELETE FROM geometry_pointXYZ WHERE profile = {self.id}")
|
||||
|
||||
ind = 0
|
||||
for point in self._points:
|
||||
data["ind"] = ind
|
||||
|
||||
@@ -15,7 +15,7 @@ class LateralContribution(SQLSubModel):
|
||||
self._status = status
|
||||
|
||||
if id == -1:
|
||||
self.id = type(self)._id_cnt
|
||||
self.id = LateralContribution._id_cnt
|
||||
else:
|
||||
self.id = id
|
||||
|
||||
@@ -29,7 +29,7 @@ class LateralContribution(SQLSubModel):
|
||||
self._header = []
|
||||
self._types = [float, float]
|
||||
|
||||
type(self)._id_cnt = max(type(self)._id_cnt + 1, self.id)
|
||||
LateralContribution._id_cnt = max(LateralContribution._id_cnt + 1, self.id)
|
||||
|
||||
@classmethod
|
||||
def _sql_create(cls, execute):
|
||||
|
||||
Reference in new issue
Block a user