Modify

Opened 5 years ago

Closed 5 years ago

#13752 closed defect (fixed)

initial database upgrade fails because of empty custom_report table

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: ClientsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

On initial activation/installation of the Clients plugin the following error occurs on "trac-admin upgrade":

2020-02-23 14:42:21,813 Trac[console] ERROR: Exception in trac-admin command: u'upgrade'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/trac/admin/console.py", line 83, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/local/lib/python2.7/cmd.py", line 220, in onecmd
    return self.default(line)
  File "/usr/local/lib/python2.7/site-packages/trac/admin/console.py", line 252, in default
    return self.cmd_mgr.execute_command(*args)
  File "/usr/local/lib/python2.7/site-packages/trac/admin/api.py", line 135, in execute_command
    return f(*fargs)
  File "/usr/local/lib/python2.7/site-packages/trac/env.py", line 1062, in _do_upgrade
    self.env.upgrade(backup=no_backup is None)
  File "/usr/local/lib/python2.7/site-packages/trac/env.py", line 787, in upgrade
    participant.upgrade_environment()
  File "/usr/local/lib/python2.7/site-packages/clients/api.py", line 238, in upgrade_environment
    self.do_reports_upgrade()
  File "/usr/local/lib/python2.7/site-packages/clients/api.py", line 190, in do_reports_upgrade
    group_title)
  File "/usr/local/lib/python2.7/site-packages/clients/reportmanager.py", line 84, in add_report
    ordering = int(ordering) + 1
TypeError: int() argument must be a string or a number, not 'NoneType'

This issue is fixed by the attached patch.

Attachments (1)

fix_reportmanager_empty_table.diff (1.2 KB) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by anonymous

comment:1 Changed 5 years ago by Ryan J Ollos

Owner: set to Ryan J Ollos
Status: newaccepted

comment:2 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 17704:

TracClients 0.5dev: Fix failure in db upgrade

Fixes #13752.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.