Francois Gouget : testbot/web: Tweak VMsList::OnItemAction() to save the Item directly.
Module: tools Branch: master Commit: 0343615675704471f9745b5a123c953b72319e64 URL: https://source.winehq.org/git/tools.git/?a=commit;h=0343615675704471f9745b5a... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Mar 27 03:45:37 2018 +0200 testbot/web: Tweak VMsList::OnItemAction() to save the Item directly. OnItemAction() is called on each selected Item and should only operate on the specified Item rather than blindly saving all the Items in the Collection. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/web/admin/VMsList.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testbot/web/admin/VMsList.pl b/testbot/web/admin/VMsList.pl index 652fc8e..500442b 100644 --- a/testbot/web/admin/VMsList.pl +++ b/testbot/web/admin/VMsList.pl @@ -58,7 +58,7 @@ sub OnItemAction($$$$) if ($Action eq "Delete") { $Item->Role("deleted"); - my ($ErrKey, $ErrProperty, $ErrMessage) = $self->{Collection}->Save(); + my ($ErrProperty, $ErrMessage) = $Item->Save(); return ! defined($ErrMessage); }
participants (1)
-
Alexandre Julliard