perfs: use a dictionary to exclude drafts from tables (#35570)
This commit is contained in:
parent
54d8532828
commit
154fcca2b6
|
@ -121,7 +121,7 @@ class FormDefUI(object):
|
|||
formdata_class = self.formdef.data_class()
|
||||
if selected_filter == 'all':
|
||||
item_ids = formdata_class.keys()
|
||||
drafts = formdata_class.get_ids_with_indexed_value('status', 'draft')
|
||||
drafts = {x: True for x in formdata_class.get_ids_with_indexed_value('status', 'draft')}
|
||||
item_ids = [x for x in item_ids if x not in drafts]
|
||||
elif selected_filter == 'waiting':
|
||||
user_roles = [logged_users_role().id] + (user.roles or [])
|
||||
|
|
Loading…
Reference in New Issue