GTG

Code review comment for lp:~tomkadwill/gtg/delete-tag2

Revision history for this message
Izidor MatuĊĦov (izidor) wrote :

Sorry for the late answer. When I run your code, I encounter the following traceback:

<code>
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/liblarch/processqueue.py", line 43, in process_queue
    func(*action[1:])
  File "/usr/lib/python2.7/dist-packages/liblarch/tree.py", line 269, in _modify_node
    self._callback('node-modified', node_id)
  File "/usr/lib/python2.7/dist-packages/liblarch/tree.py", line 78, in _callback
    func(node_id)
  File "/usr/lib/python2.7/dist-packages/liblarch/viewcount.py", line 85, in __modify
    displayed &= filt.is_displayed(nid)
  File "/usr/lib/python2.7/dist-packages/liblarch/filters_bank.py", line 42, in is_displayed
    value = self.func(task, parameters=self.dic)
  File "/home/izidor/projects/gtg/trunk/GTG/core/treefactory.py", line 146, in tag_filter
    return node.has_tags([tag])
  File "/home/izidor/projects/gtg/trunk/GTG/core/task.py", line 767, in has_tags
    toreturn = children_tag(tagname)
  File "/home/izidor/projects/gtg/trunk/GTG/core/task.py", line 751, in children_tag
    for tagc_name in tag.get_children():
AttributeError: 'NoneType' object has no attribute 'get_children'
</code>

At the moment, only one tag could be selected & removed. Please, change the text in the dialog to something like:

"Do you want to remove tag <b>[tag name]</b>?"

Make it different from the normal delete dialog.

Please, comment properly method

def ask_delete_tags(self, tags):

It took me quite a moment to understand how it work and why it works so. Please, use a loop instead of tags[0].

review: Needs Fixing (code,run)

« Back to merge proposal