fix migration
This commit is contained in:
parent
2a9d0d613f
commit
a43055ddd9
|
@ -1,5 +1,5 @@
|
||||||
from orm.base import local_session
|
from orm.base import local_session
|
||||||
from orm import Topic
|
from orm import Topic, Community
|
||||||
from dateutil.parser import parse as date_parse
|
from dateutil.parser import parse as date_parse
|
||||||
|
|
||||||
def migrate(entry):
|
def migrate(entry):
|
||||||
|
@ -20,7 +20,8 @@ def migrate(entry):
|
||||||
'title': entry['title'].lower(),
|
'title': entry['title'].lower(),
|
||||||
'parents': [],
|
'parents': [],
|
||||||
'children': [],
|
'children': [],
|
||||||
'cat_id': entry['_id']
|
'cat_id': entry['_id'],
|
||||||
|
'community' : Community.default_community.slug
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user