kraanzu / dooit

An awesome TUI todo manager
https://pypi.org/project/dooit/
MIT License
2.07k stars 100 forks source link

[BUG] Deleting a task with child nodes crashes #169

Closed trag1c closed 8 months ago

trag1c commented 8 months ago

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): 🤖

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'
kraanzu commented 8 months ago

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

Thanks for opening an issue!

kraanzu commented 8 months ago

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

kraanzu commented 8 months ago

I'm closing this for now. Feel free to reopen if the problem still persists Thank you :heart:

github-actions[bot] commented 8 months ago

Did we solve your problem? Glad we could help!

Consider sponsoring my work through github sponsors :smile: – @kraanzu

trag1c commented 8 months ago

Hey I forgot to check, sorry 😅 The problem is indeed fixed, thanks!