mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
BC, LC: Fix convert exceptions.
This commit is contained in:
1 parent
9ecd9a8f2a
commit
0835900aad
2 files changed
+18
-4
No files matched your search
@@ -16,11 +16,15 @@
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
|
||||
from tools import trace, timer, old_pamhyr_date_to_timestamp
|
||||
|
||||
from Model.DB import SQLSubModel
|
||||
from Model.Except import NotImplementedMethodeError
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
class BoundaryCondition(SQLSubModel):
|
||||
_sub_classes = []
|
||||
_id_cnt = 0
|
||||
@@ -317,14 +321,17 @@ class BoundaryCondition(SQLSubModel):
|
||||
new = cls(name = self.name, status = self._status)
|
||||
new.node = self.node
|
||||
|
||||
for i, _ in self.data:
|
||||
for i, _ in enumerate(self.data):
|
||||
new.add(i)
|
||||
|
||||
for i in [0,1]:
|
||||
for j in [0,1]:
|
||||
if self._header[i] == new.header[j]:
|
||||
for ind, v in self.data:
|
||||
new._set_i_c_v(ind, j, v[i])
|
||||
try:
|
||||
new._set_i_c_v(ind, j, v[i])
|
||||
except Exception as e:
|
||||
logger.info(e)
|
||||
|
||||
return new
|
||||
|
||||
|
||||
Reference in new issue
Block a user