[hotfix] datetime formatting caused error when time not set

This commit is contained in:
Marcel Paffrath 2024-06-06 13:55:11 +02:00
parent 8f22d438d3
commit 2d08fd029d

View File

@ -1459,7 +1459,7 @@ class MainWindow(QMainWindow):
if event.dirty:
event_str += '*'
item_path = QStandardItem(event_str)
item_time = QStandardItem('{}'.format(time.strftime("%Y-%m-%d %H:%M:%S")))
item_time = QStandardItem('{}'.format(time.strftime("%Y-%m-%d %H:%M:%S") if time else ''))
item_lat = QStandardItem('{}'.format(lat))
item_lon = QStandardItem('{}'.format(lon))
item_depth = QStandardItem('{}'.format(depth))