Skip to content

Commit

Permalink
fixup! fixup! Add support for categories. This fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
christf committed Sep 19, 2018
1 parent b2ea6ba commit 0ff3d90
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions todoman/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ def add_file(self, list_name, path, mtime):
raise exceptions.AlreadyExists('file', list_name) from e

def add_category(self, uid, category):
try:
self._conn.execute(
'''
INSERT INTO categories (
Expand Down Expand Up @@ -800,7 +799,7 @@ def _todo_from_db(self, row):
todo.status = row['status']
todo.description = row['description']
todo.location = row['location']
todo.categories = []
# todo.categories = []
#row['categories']
# TODO: category korrekt befüllen
todo.sequence = row['sequence']
Expand Down Expand Up @@ -959,6 +958,9 @@ def update_cache(self):

self.cache.save_to_disk()

def todos(self, **kwargs):
return self.cache.todos(**kwargs)

def todo(self, id, **kwargs):
return self.cache.todo(id, **kwargs)

Expand Down

0 comments on commit 0ff3d90

Please sign in to comment.