[PATCH] Revert "testbot/web: Tweak VMDetails.pl to save the Item directly."

Francois Gouget fgouget at codeweavers.com
Fri Jun 1 02:42:00 CDT 2018


Saving the item directly is ok when modifying it, but DBIBackend only
supports saving new items through the collection. In particular the
VMDetails page is also used to create new VMs so we have no choice but
to go through the collection.

This reverts commit 71a9602bb6eab2b54e930080b8ef728064d6a664.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/web/admin/VMDetails.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testbot/web/admin/VMDetails.pl b/testbot/web/admin/VMDetails.pl
index 057147157..9603e346a 100644
--- a/testbot/web/admin/VMDetails.pl
+++ b/testbot/web/admin/VMDetails.pl
@@ -62,7 +62,8 @@ sub Save($)
     }
   }
 
-  ($self->{ErrField}, $self->{ErrMessage}) = $self->{Item}->Save();
+  my $ErrKey;
+  ($ErrKey, $self->{ErrField}, $self->{ErrMessage}) = $self->{Collection}->Save();
   return ! defined($self->{ErrMessage});
 }
 
-- 
2.17.0



More information about the wine-devel mailing list