BC: Fix paste command.

setup.py
Pierre-Antoine Rouby 2023-11-20 15:55:57 +01:00
parent ce5808e3ce
commit fd0a8ddf51
2 changed files with 3 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class BoundaryCondition(SQLSubModel):
@classmethod
def time_convert(cls, data):
if data is str and data.count(":") == 3:
if type(data) is str and data.count(":") == 3:
return old_pamhyr_date_to_timestamp(data)
return int(data)

View File

@ -289,6 +289,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
def _paste(self):
header, data = self.parseClipboardTable()
logger.debug(f"paste: h:{header}, d:{data}")
if len(data) == 0:
return