changeset f4c77eb02b5b in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=f4c77eb02b5b
description:
        Clear private caches when dropping database

        issue11744
        review413601003
diffstat:

 trytond/backend/postgresql/database.py |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 38bd66006727 -r f4c77eb02b5b trytond/backend/postgresql/database.py
--- a/trytond/backend/postgresql/database.py    Mon Oct 03 00:06:41 2022 +0200
+++ b/trytond/backend/postgresql/database.py    Mon Oct 03 00:15:12 2022 +0200
@@ -299,6 +299,8 @@
         cursor.execute(SQL("DROP DATABASE {}")
             .format(Identifier(database_name)))
         cls._list_cache.clear()
+        cls._has_proc.pop(database_name, None)
+        cls._search_full_text_languages.pop(database_name, None)
 
     def get_version(self, connection):
         version = connection.server_version

Reply via email to