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 LateralContribution(SQLSubModel):
|
||||
_sub_classes = []
|
||||
_id_cnt = 0
|
||||
@@ -358,14 +362,17 @@ class LateralContribution(SQLSubModel):
|
||||
new.begin_kp = self.begin_kp
|
||||
new.end_kp = self.end_kp
|
||||
|
||||
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)
|
||||
|
||||
self._status.modified()
|
||||
return new
|
||||
|
||||
Reference in new issue
Block a user