diff --git a/migrate.py b/migrate.py index 5c498493..b98eb9cc 100644 --- a/migrate.py +++ b/migrate.py @@ -67,5 +67,8 @@ if __name__ == '__main__': topics() users() shouts() + elif sys.argv[1] == "bson": + import migration.bson2json + bson2json.json_tables() else: print('usage: python migrate.py ') \ No newline at end of file diff --git a/migration/tables/content_items.py b/migration/tables/content_items.py index 43830907..a352b0b9 100644 --- a/migration/tables/content_items.py +++ b/migration/tables/content_items.py @@ -75,8 +75,6 @@ def migrate(entry): r['body'] = '' elif entry.get('type') == 'Music': r['body'] = '' - else entry.get('type') == 'Image': - r['body'] = r['body'] else: r['body'] = '## ' + r['title'] # TODO: compile md with graymatter diff --git a/orm/topic.py b/orm/topic.py index a347a7b2..2fc23aba 100644 --- a/orm/topic.py +++ b/orm/topic.py @@ -26,3 +26,4 @@ class Topic(Base): parents = relationship(lambda: Topic, secondary=Connection, primaryjoin=slug==Connection.c.parent, secondaryjoin=slug==Connection.c.child, viewonly=True) # list of Topics where the current node is the "parent" children = relationship(lambda: Topic, secondary=Connection, primaryjoin=slug==Connection.c.child, secondaryjoin=slug==Connection.c.parent) +