optimize search-queries, line: fix state-selection

This commit is contained in:
Frederik Jaeckel 2023-07-24 17:31:34 +02:00
parent e605d5f0d3
commit 90298d3eb8
6 changed files with 20 additions and 20 deletions

View file

@ -574,7 +574,7 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
'defbook', 'book1', 'book2', 'book3',
'book4', 'book5']:
cfg1 = ConfigUser.search([
('iduser.id', '=', book.owner.id),
('iduser', '=', book.owner.id),
('%s.id' % x, '=', book.id)])
if len(cfg1) > 0:
to_write_config.extend([cfg1, {x: None}])