create peers folder if needed

This commit is contained in:
j 2019-01-18 17:02:44 +05:30
parent c05ceaf175
commit 2d9f5446dc

View file

@ -602,6 +602,9 @@ def migrate_13():
import json
path = os.path.join(settings.data_path, 'peers', '%s.log' % settings.USER_ID)
if not os.path.exists(path):
folder = os.path.dirname(path)
if not os.path.exists(folder):
os.makedirs(folder)
with db.session() as session:
revision = -1
qs = changelog.Changelog.query.filter_by(user_id=settings.USER_ID)