deleting an account with a linked transaction causes problem for sibling

Bug #514183 reported by Michael Rooney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wxBanker
Fix Released
High
Michael Rooney

Bug Description

In the worst case this means that when restarting you cannot view transactions for an account with an orphaned sibling or view the summary for that account or All accounts.

  File "/home/michael/Code/wxbanker-0.6/wxbanker/accountlistctrl.py", line 223, in SelectVisibleItem
    self.SelectItem(i)
  File "/home/michael/Code/wxbanker-0.6/wxbanker/accountlistctrl.py", line 210, in SelectItem
    Publisher().sendMessage("view.account changed", account)
  File "/usr/lib64/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/pubsub.py", line 811, in sendMessage
    self.__topicTree.sendMessage(aTopic, message, onTopicNeverCreated)
  File "/usr/lib64/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/pubsub.py", line 498, in sendMessage
    deliveryCount += node.sendMessage(message)
  File "/usr/lib64/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/pubsub.py", line 336, in sendMessage
    listener(message)
  File "/home/michael/Code/wxbanker-0.6/wxbanker/managetab.py", line 81, in onChangeAccount
    self.transactionPanel.setAccount(account)
  File "/home/michael/Code/wxbanker-0.6/wxbanker/managetab.py", line 110, in setAccount
    self.transactionCtrl.setAccount(*args, **kwargs)
  File "/home/michael/Code/wxbanker-0.6/wxbanker/transactionolv.py", line 148, in setAccount
    transactions = account.Transactions
  File "/home/michael/Code/wxbanker-0.6/wxbanker/bankobjects/account.py", line 93, in GetTransactions
    self._Transactions = self.Store.getTransactionsFrom(self)
  File "/home/michael/Code/wxbanker-0.6/wxbanker/persistentstore.py", line 368, in getTransactionsFrom
    t = self.result2transaction(result, account, recurringCache=recurringCache)
  File "/home/michael/Code/wxbanker-0.6/wxbanker/persistentstore.py", line 349, in result2transaction
    link, linkAccount = self.getTransactionAndParentById(linkId, parentObj, linked=t)
  File "/home/michael/Code/wxbanker-0.6/wxbanker/persistentstore.py", line 378, in getTransactionAndParentById
    if account.ID == result[1]:
TypeError: 'NoneType' object is unsubscriptable

Michael Rooney (mrooney)
Changed in wxbanker:
milestone: none → 0.7
assignee: nobody → Michael Rooney (mrooney)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Michael Rooney (mrooney) wrote :

I fixed this for new deletions, but it would be ideal to unbreak any databases that have had this problem.

Changed in wxbanker:
milestone: 0.7 → none
status: Confirmed → In Progress
Revision history for this message
Michael Rooney (mrooney) wrote :

Revision 516 will detect this and remove the link for existing "orphaned" links.

Changed in wxbanker:
status: In Progress → Fix Committed
milestone: none → 0.7
Michael Rooney (mrooney)
Changed in wxbanker:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.