From 84bf66a1fff9643dd1bd542cb1f82d2eab5f04ae Mon Sep 17 00:00:00 2001 From: Herman Snevajs Date: Thu, 7 Nov 2024 15:56:54 +0100 Subject: [PATCH] Fix flask create project command --- server/mergin/sync/commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/mergin/sync/commands.py b/server/mergin/sync/commands.py index a07d5966..dc0aec28 100644 --- a/server/mergin/sync/commands.py +++ b/server/mergin/sync/commands.py @@ -13,6 +13,7 @@ from .. import db from .models import Project, ProjectAccess, ProjectVersion from .utils import split_project_path +from ..auth.models import User def add_commands(app: Flask): @@ -28,6 +29,7 @@ def project(): def create(name, namespace, user): # pylint: disable=W0612 """Create blank project""" workspace = current_app.ws_handler.get_by_name(namespace) + user = User.query.get(int(user)) project_params = dict( creator=user, name=name,