File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed
Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 44from logging .config import fileConfig
55
66from alembic import context
7+ from core ._dotenv import load_dotenv # noqa: F401
78from core .core .config import settings
89from core .db .models import * # noqa: F403
910from sqlalchemy import pool
Original file line number Diff line number Diff line change 1- import os
1+ from pathlib import Path
22
33from dotenv import load_dotenv
44
5- BASEDIR = os .path .abspath (os .path .dirname (__file__ ))
6- load_dotenv (os .path .join (BASEDIR ,"../../.env" ))
5+ BASE_DIR = Path (__file__ ).resolve ().parents [2 ]
6+ ENV_FILE = BASE_DIR / ".env"
7+ ROOT_ENV = Path ("/app/.env" )
8+
9+ load_dotenv (ENV_FILE )
10+
11+ if ROOT_ENV .exists ():
12+ load_dotenv (ROOT_ENV , override = True )
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ async def get_public_project(
179179 project = result .scalars ().first ()
180180 if not project :
181181 return None
182- project_public_read = ProjectPublicRead (** project .dict ())
182+ project_public_read = ProjectPublicRead (** project .model_dump ())
183183 return project_public_read
184184
185185 async def publish_project (
Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ class IFeatureStandardUpdate(FeatureUpdateBase):
377377class FeatureToolAttributesBase (BaseModel ):
378378 """Base model for additional attributes feature layer tool."""
379379
380- tool_type : ToolType = Field (... , description = "Tool type" )
380+ tool_type : ToolType | None = Field (None , description = "Tool type" )
381381
382382
383383feature_layer_tool_attributes_example = {
You can’t perform that action at this time.
0 commit comments