Cédric Krier pushed to branch branch/default at Tryton / Tryton


Commits:
f19de425 by EdbO at 2023-08-03T16:38:32+02:00
Cache the url for authentication service

When starting the desktop client you can select a profile. And by doing
that, the client sends a request to fetch the authentication services.
The data of the request is then cached but the url is not so the client
forget about it. Because of the cached data, when selecting a particular
profile data is taken from the cache but the url is not updated leaving
it unchanged and empty or with a url from last request.

Closes #12440
- - - - -


1 changed file:

- tryton/tryton/gui/window/dblogin.py


Changes:

=====================================
tryton/tryton/gui/window/dblogin.py
=====================================
@@ -617,7 +617,7 @@
             button.get_parent().remove(button)
         self.services = []
         if key in self._services:
-            self.services = self._services[key]
+            self.services, self.service_base = self._services[key]
         elif hostname and port:
             self.service_base, self.services = rpc.authentication_services(
                 hostname, port)
@@ -621,7 +621,7 @@
         elif hostname and port:
             self.service_base, self.services = rpc.authentication_services(
                 hostname, port)
-            self._services[key] = self.services
+            self._services[key] = (self.services, self.service_base)
         for response_id, (name, url) in enumerate(self.services, 1):
             button = Gtk.Button(label=name)
             self.dialog.add_action_widget(button, response_id)



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/f19de425f8c3c038a4aaed2b30a34155bb750939

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/f19de425f8c3c038a4aaed2b30a34155bb750939
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to