mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
Fix failure to import into directory journal (#1314)
* Re-enable failing directory journal import tests * Appropriately track journal name and modified entries in FolderJournal when importing * Run make format
This commit is contained in:
parent
08350b884b
commit
7109374d42
3 changed files with 14 additions and 10 deletions
|
@ -67,9 +67,11 @@ class Journal:
|
|||
return new_journal
|
||||
|
||||
def import_(self, other_journal_txt):
|
||||
self.entries = list(
|
||||
frozenset(self.entries) | frozenset(self._parse(other_journal_txt))
|
||||
)
|
||||
imported_entries = self._parse(other_journal_txt)
|
||||
for entry in imported_entries:
|
||||
entry.modified = True
|
||||
|
||||
self.entries = list(frozenset(self.entries) | frozenset(imported_entries))
|
||||
self.sort()
|
||||
|
||||
def open(self, filename=None):
|
||||
|
@ -414,7 +416,7 @@ def open_journal(journal_name, config, legacy=False):
|
|||
else:
|
||||
from . import FolderJournal
|
||||
|
||||
return FolderJournal.Folder(**config).open()
|
||||
return FolderJournal.Folder(journal_name, **config).open()
|
||||
|
||||
if not config["encrypt"]:
|
||||
if legacy:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue