Removing blog tag since it's not used.
This commit is contained in:
parent
132ba12626
commit
81411e3361
|
@ -71,19 +71,6 @@ class Blog_converter( object ):
|
||||||
# load the forum tag
|
# load the forum tag
|
||||||
forum_tag = self.database.select_one( Tag, Tag.sql_load_by_name( u"forum", user_id = anonymous.object_id ) )
|
forum_tag = self.database.select_one( Tag, Tag.sql_load_by_name( u"forum", user_id = anonymous.object_id ) )
|
||||||
|
|
||||||
# load the blog tag, or create one if it doesn't exist
|
|
||||||
blog_tag = self.database.select_one( Tag, Tag.sql_load_by_name( u"blog", user_id = anonymous.object_id ) )
|
|
||||||
if not blog_tag:
|
|
||||||
tag_id = self.database.next_id( Tag, commit = False )
|
|
||||||
blog_tag = Tag.create(
|
|
||||||
tag_id,
|
|
||||||
notebook_id = None, # this tag is not in the namespace of a single notebook
|
|
||||||
user_id = anonymous.object_id,
|
|
||||||
name = u"blog",
|
|
||||||
description = u"web log"
|
|
||||||
)
|
|
||||||
self.database.save( blog_tag, commit = False )
|
|
||||||
|
|
||||||
# associate the forum tag with the previously created notebook thread, and set that
|
# associate the forum tag with the previously created notebook thread, and set that
|
||||||
# association's value to the forum name
|
# association's value to the forum name
|
||||||
self.database.execute(
|
self.database.execute(
|
||||||
|
@ -91,12 +78,6 @@ class Blog_converter( object ):
|
||||||
commit = False,
|
commit = False,
|
||||||
)
|
)
|
||||||
|
|
||||||
# associate the blog tag with the previously created notebook thread
|
|
||||||
self.database.execute(
|
|
||||||
anonymous.sql_save_notebook_tag( notebook_id, blog_tag.object_id ),
|
|
||||||
commit = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
# give the anonymous user access to the new notebook thread
|
# give the anonymous user access to the new notebook thread
|
||||||
self.database.execute(
|
self.database.execute(
|
||||||
anonymous.sql_save_notebook( notebook_id, read_write = True, owner = False, own_notes_only = True ),
|
anonymous.sql_save_notebook( notebook_id, read_write = True, owner = False, own_notes_only = True ),
|
||||||
|
|
Reference in New Issue