Francois Gouget : testbot/web: Use AddError() to set the item list action error.
Alexandre Julliard
julliard at winehq.org
Wed Jul 6 12:02:25 CDT 2022
Module: tools
Branch: master
Commit: ce0a7b4413c8097fe07c82ca448fcfe6648474c3
URL: https://source.winehq.org/git/tools.git/?a=commit;h=ce0a7b4413c8097fe07c82ca448fcfe6648474c3
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Wed Jul 6 16:05:39 2022 +0200
testbot/web: Use AddError() to set the item list action error.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/FailuresList.pl | 4 ++--
testbot/web/admin/UsersList.pl | 4 ++--
testbot/web/admin/VMsList.pl | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/testbot/web/FailuresList.pl b/testbot/web/FailuresList.pl
index 2cb40c48..d1f8de6d 100644
--- a/testbot/web/FailuresList.pl
+++ b/testbot/web/FailuresList.pl
@@ -138,8 +138,8 @@ sub OnItemAction($$$)
my ($_ErrProperty, $ErrMessage) = $Failure->Save();
if (defined $ErrMessage)
{
- # Setting ErrField is only useful on form pages
- $self->{EnclosingPage}->SetError(undef, $ErrMessage);
+ # Setting the error field is only useful on form pages
+ $self->{EnclosingPage}->AddError($ErrMessage);
return 0;
}
return 1;
diff --git a/testbot/web/admin/UsersList.pl b/testbot/web/admin/UsersList.pl
index 5f9f47b4..6fdb06d0 100644
--- a/testbot/web/admin/UsersList.pl
+++ b/testbot/web/admin/UsersList.pl
@@ -109,8 +109,8 @@ sub OnItemAction($$$)
my ($_ErrProperty, $ErrMessage) = $User->Save();
if (defined $ErrMessage)
{
- # Setting ErrField is only useful on form pages
- $self->{EnclosingPage}->SetError(undef, $ErrMessage);
+ # Setting the error field is only useful on form pages
+ $self->{EnclosingPage}->AddError($ErrMessage);
return 0;
}
diff --git a/testbot/web/admin/VMsList.pl b/testbot/web/admin/VMsList.pl
index 6c3ff203..3361c03f 100644
--- a/testbot/web/admin/VMsList.pl
+++ b/testbot/web/admin/VMsList.pl
@@ -52,8 +52,8 @@ sub OnItemAction($$$)
my ($_ErrProperty, $ErrMessage) = $VM->Save();
if (defined $ErrMessage)
{
- # Setting ErrField is only useful on form pages
- $self->{EnclosingPage}->SetError(undef, $ErrMessage);
+ # Setting the error field is only useful on form pages
+ $self->{EnclosingPage}->AddError($ErrMessage);
return 0;
}
return 1;
More information about the wine-cvs
mailing list