0001-perfs-use-a-dictionary-to-exclude-drafts-from-tables.patch
wcs/forms/backoffice.py | ||
---|---|---|
121 | 121 |
formdata_class = self.formdef.data_class() |
122 | 122 |
if selected_filter == 'all': |
123 | 123 |
item_ids = formdata_class.keys() |
124 |
drafts = formdata_class.get_ids_with_indexed_value('status', 'draft')
|
|
124 |
drafts = {x: True for x in formdata_class.get_ids_with_indexed_value('status', 'draft')}
|
|
125 | 125 |
item_ids = [x for x in item_ids if x not in drafts] |
126 | 126 |
elif selected_filter == 'waiting': |
127 | 127 |
user_roles = [logged_users_role().id] + (user.roles or []) |
128 |
- |