Hi Marlon,
The change to "models.py" appears to increase safety.
I will defer to you about the Selenium content (exciting stuff!).
I had a question about the change to "widgets.py".
You are forcing a "self.apply_orderby('pk')" even if there is a orderby already
specified (and there is always a default orderby in all our normal Toaster
tables), resulting in an extra sort.
May I recommend instead this, so only one sort is ever executed:
if orderby:
self.apply_orderby(orderby)
else:
self.apply_orderby('pk')
Was there a specific workflow that lead you to add this code, I wonder?
Thanks,
David
-----Original Message-----
From: [email protected]
<[email protected]> On Behalf Of Marlon Rodriguez Garcia via
lists.openembedded.org
Sent: Tuesday, October 3, 2023 10:26 AM
To: [email protected]
Cc: Marlon Rodriguez Garcia <[email protected]>
Subject: [bitbake-devel] [PATCH 1/1] toaster:update selenium version and code
syntax
Updated selenium version to latest 4.13.0, changed selenum specific version
syntax elements to accomplish test success
Signed-off-by: Marlon Rodriguez Garcia
<[email protected]>
---
lib/toaster/orm/models.py | 2 +-
===[CUT]===
lib/toaster/toastergui/widgets.py | 1 +
16 files changed, 156 insertions(+), 118 deletions(-)
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index f9fcf9e4..0d503a51 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1733,7 +1733,7 @@ class CustomImageRecipe(Recipe):
packages_conf += "\""
base_recipe_path = self.get_base_recipe_file()
- if base_recipe_path:
+ if base_recipe_path and os.path.isfile(base_recipe_path):
base_recipe = open(base_recipe_path, 'r').read()
else:
# Pass back None to trigger error message to user
diff --git a/lib/toaster/toastergui/widgets.py
b/lib/toaster/toastergui/widgets.py
index 53696912..6e87285c 100644
===[CUT]===
--- a/lib/toaster/toastergui/widgets.py
+++ b/lib/toaster/toastergui/widgets.py
@@ -305,6 +305,7 @@ class ToasterTable(TemplateView):
self.setup_columns(**kwargs)
+ self.apply_orderby('pk')
if search:
self.apply_search(search)
if filters:
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5843): https://lists.yoctoproject.org/g/toaster/message/5843
Mute This Topic: https://lists.yoctoproject.org/mt/101744156/21656
Group Owner: [email protected]
Unsubscribe:
https://lists.yoctoproject.org/g/toaster/leave/6695957/21656/14417857/xyzzy
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-