changeset 2a74b7c51d93 in trytond:5.0
details: https://hg.tryton.org/trytond?cmd=changeset&node=2a74b7c51d93
description:
        Update logging message for re-run update

        issue10286
        review357811002
        (grafted from 67445c3ac5d6a4d770b394512efac3660babb8b0)
diffstat:

 trytond/backend/postgresql/table.py |  14 +++++---------
 trytond/convert.py                  |   8 +++-----
 2 files changed, 8 insertions(+), 14 deletions(-)

diffs (42 lines):

diff -r 4ddfd742b60a -r 2a74b7c51d93 trytond/backend/postgresql/table.py
--- a/trytond/backend/postgresql/table.py       Thu Jun 17 21:22:43 2021 +0200
+++ b/trytond/backend/postgresql/table.py       Wed Apr 21 23:54:43 2021 +0200
@@ -398,15 +398,11 @@
                     self._update_definitions(columns=True)
                 else:
                     logger.warning(
-                        'Unable to set column %s '
-                        'of table %s not null !\n'
-                        'Try to re-run: '
-                        'trytond.py --update=module\n'
-                        'If it doesn\'t work, update records '
-                        'and execute manually:\n'
-                        'ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL',
-                        column_name, self.table_name, self.table_name,
-                        column_name)
+                        "Unable to set not null on column %s of table %s.\n"
+                        "Try restarting one more time.\n"
+                        "If that doesn't work update the records and restart "
+                        "again.",
+                        column_name, self.table_name)
             elif action == 'remove':
                 if not self._columns[column_name]['notnull']:
                     return
diff -r 4ddfd742b60a -r 2a74b7c51d93 trytond/convert.py
--- a/trytond/convert.py        Thu Jun 17 21:22:43 2021 +0200
+++ b/trytond/convert.py        Wed Apr 21 23:54:43 2021 +0200
@@ -803,11 +803,9 @@
         except Exception:
             transaction.rollback()
             logger.error(
-                'Could not delete id: %d of model %s\n'
-                'There should be some relation '
-                'that points to this resource\n'
-                'You should manually fix this '
-                'and restart --update=module\n',
+                "Could not delete id %d from model %s.\n"
+                "There may be a relation that points to this resource "
+                "that must be manually fixed before restarting the update.",
                 db_id, model, exc_info=True)
             if 'active' in Model._fields:
                 try:

Reply via email to