mirror of
https://github.com/simonmichael/hledger.git
synced 2025-01-07 19:28:26 +03:00
lib: avoid shady Not (Or []) in account type queries
This commit is contained in:
parent
6c392e9f43
commit
b31e40ceca
@ -338,7 +338,8 @@ journalAccountTypeQuery atypes fallbackregex Journal{jdeclaredaccounttypes} =
|
||||
concat $ mapMaybe (`M.lookup` jdeclaredaccounttypes) atypes
|
||||
in case declaredacctsoftype of
|
||||
[] -> Acct fallbackregex
|
||||
as -> And [ Or acctnameRegexes , Not $ Or differentlyTypedRegexes ]
|
||||
as -> And $ [ Or acctnameRegexes ]
|
||||
++ if null differentlyTypedRegexes then [] else [ Not $ Or differentlyTypedRegexes ]
|
||||
where
|
||||
-- XXX Query isn't able to match account type since that requires extra info from the journal.
|
||||
-- So we do a hacky search by name instead.
|
||||
|
Loading…
Reference in New Issue
Block a user