diff --git a/model/User.py b/model/User.py index 33289d9..dc4e5d7 100644 --- a/model/User.py +++ b/model/User.py @@ -129,7 +129,7 @@ class User( Persistent ): def sql_load_by_email_address( email_address ): return "select * from luminotes_user_current where email_address = %s;" % quote( email_address ) - def sql_load_notebooks( self, parents_only = False, deleted = False ): + def sql_load_notebooks( self, parents_only = False ): """ Return a SQL string to load a list of the notebooks to which this user has access. """ @@ -138,15 +138,10 @@ class User( Persistent ): else: parents_only_clause = "" - if deleted: - deleted_clause = " and deleted = 't'" - else: - deleted_clause = " and deleted = 'f'" - return \ "select notebook_current.*, user_notebook.read_write from user_notebook, notebook_current " + \ - "where user_id = %s%s%s and user_notebook.notebook_id = notebook_current.id order by revision;" % \ - ( quote( self.object_id ), parents_only_clause, deleted_clause ) + "where user_id = %s%s and user_notebook.notebook_id = notebook_current.id order by revision;" % \ + ( quote( self.object_id ), parents_only_clause ) def sql_save_notebook( self, notebook_id, read_write = True ): """ diff --git a/view/Link_area.py b/view/Link_area.py index b8a0743..fab7623 100644 --- a/view/Link_area.py +++ b/view/Link_area.py @@ -4,7 +4,7 @@ from Rounded_div import Rounded_div class Link_area( Div ): def __init__( self, notebooks, notebook, total_notes_count, parent_id, notebook_path, user ): - linked_notebooks = [ nb for nb in notebooks if nb.read_write and nb.name not in ( u"trash" ) ] + linked_notebooks = [ nb for nb in notebooks if nb.read_write and nb.name not in ( u"trash" ) and nb.deleted is False ] Div.__init__( self,