You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actions on child list views should be handled correctly, when all records are selected, and only update its records. In addition, it should not only work on the first child view hats displayed but also the second and so on.
@action('set_ready', 'status ready', single=False)defset_ready(self, items):
""" set selected records status to 'ready' """foriteminitems:
try:
item.status='ready'self.datamodel.edit(item)
self.update_redirect()
except:
passreturnredirect(self.get_redirect())
The try addition in the code fixes the problem that if I'm selecting all records on the first related view, the records on the second view get selected as well. This causes an error in the application.
Describe the actual results
The records of the first related view get updated as expected when selecting all records. If I'm selecting all records of the second child and execute the action, the records of the first child get updated, but the ones of the second don't change.
Steps to reproduce
Have a main view, with several child views
select all records with the check bock on top
execute the action to modify those records
The text was updated successfully, but these errors were encountered:
Environment
Flask-Appbuilder version: 4.3.9
pip freeze output:
Describe the expected results
Actions on child list views should be handled correctly, when all records are selected, and only update its records. In addition, it should not only work on the first child view hats displayed but also the second and so on.
The try addition in the code fixes the problem that if I'm selecting all records on the first related view, the records on the second view get selected as well. This causes an error in the application.
Describe the actual results
The records of the first related view get updated as expected when selecting all records. If I'm selecting all records of the second child and execute the action, the records of the first child get updated, but the ones of the second don't change.
Steps to reproduce
The text was updated successfully, but these errors were encountered: