From 77967c75197bef80324466c52bf45cb44dde44cb Mon Sep 17 00:00:00 2001
From: inso <insomniak.fr@gmaiL.com>
Date: Thu, 17 Mar 2016 10:47:25 +0100
Subject: [PATCH] Fix loading and saving

---
 src/sakia/core/txhistory.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/sakia/core/txhistory.py b/src/sakia/core/txhistory.py
index 71598a8b..3efc5562 100644
--- a/src/sakia/core/txhistory.py
+++ b/src/sakia/core/txhistory.py
@@ -43,7 +43,7 @@ class TxHistory():
             self._transfers.append(Transfer.load(s, version))
 
         for s in data['sources']:
-            self.available_sources.append(InputSource.from_inline(s['inline']))
+            self.available_sources.append(s.copy())
 
         for d in data['dividends']:
             d['state'] = TransferState[d['state']]
@@ -58,8 +58,7 @@ class TxHistory():
 
         data_sources = []
         for s in self.available_sources:
-            s.index = 0
-            data_sources.append({'inline': "{0}\n".format(s.inline())})
+            data_sources.append(s)
 
         data_dividends = []
         for d in self._dividends.copy():
-- 
GitLab