kraanzu / dooit

An awesome TUI todo manager

Home Page:https://pypi.org/project/dooit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Deleting a task with child nodes crashes

trag1c opened this issue ยท comments

Describe the bug ๐Ÿ›
When creating a task with child nodes, trying to remove the parent task results in a crash. The task does get deleted successfully though.

To Reproduce ๐Ÿฃ
Steps to reproduce the behavior:

  1. Create a task foo
  2. Add a child task bar to it
  3. Try removing task foo (xx)
  4. See error

Desktop (please complete the following information): ๐Ÿค–

  • OS: macOS
  • Version: 14.2.1

Additional context ๐Ÿ“

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ /Users/trag1c/.local/pipx/venvs/dooit/lib/python3.12/site-packages/textual/app.py:3271 in _on_notify     โ”‚
โ”‚                                                                                                          โ”‚
โ”‚   3268 โ”‚                                                                                                 โ”‚
โ”‚   3269 โ”‚   def _on_notify(self, event: Notify) -> None:                                                  โ”‚
โ”‚   3270 โ”‚   โ”‚   """Handle notification message."""                                                        โ”‚
โ”‚ โฑ 3271 โ”‚   โ”‚   self._notifications.add(event.notification)                                               โ”‚
โ”‚   3272 โ”‚   โ”‚   self._refresh_notifications()                                                             โ”‚
โ”‚   3273 โ”‚                                                                                                 โ”‚
โ”‚   3274 โ”‚   def _unnotify(self, notification: Notification, refresh: bool = True) -> None:                โ”‚
โ”‚                                                                                                          โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ                                                 โ”‚
โ”‚ โ”‚ event = Notify()                                     โ”‚                                                 โ”‚
โ”‚ โ”‚  self = Dooit(title='Dooit', classes={'-dark-mode'}) โ”‚                                                 โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ                                                 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
AttributeError: 'Notify' object has no attribute 'notification'

Hmm .. I thought this was fixed in dev but maybe not
Pushing a fix!

Thanks for opening an issue!

Should be fixed in the latest release! Can you re-check?
Thanks

I'm closing this for now. Feel free to reopen if the problem still persists
Thank you โค๏ธ

Did we solve your problem?
Glad we could help!

Consider sponsoring my work through github sponsors ๐Ÿ˜„
โ€“ @kraanzu

Hey I forgot to check, sorry ๐Ÿ˜… The problem is indeed fixed, thanks!