Skip to content
Snippets Groups Projects
Commit eaada992 authored by Vincent Texier's avatar Vincent Texier
Browse files

[fix] fix bug in tx history table_model.py conditions field update

Fix test
parent f20cb71b
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ class HistoryTableModel(QAbstractTableModel):
sources_conditions = [
source.conditions
for source in sources
if "%&&%" in source.conditions or "%||%" in source.conditions
if "&&" in source.conditions or "||" in source.conditions
]
transfer.conditions = (
sources_conditions[0] if len(sources_conditions) > 0 else None
......
......@@ -65,6 +65,10 @@ async def test_tx_history_table_model(
history_table_model.change_transfer(transfers[0])
assert len(history_table_model.transfers_data) == 2
conditions_data = history_table_model.transfers_data[0][
HistoryTableModel.columns_types.index("conditions")
]
if conditions_data is None:
conditions_data = history_table_model.transfers_data[1][
HistoryTableModel.columns_types.index("conditions")
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment