Skip to content

Commit

Permalink
get project works
Browse files Browse the repository at this point in the history
  • Loading branch information
tcnichol committed Jul 30, 2024
1 parent 5c508e2 commit 91e14cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .run/Python tests in tests.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<module name="clowder2" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="SDK_HOME" value="$USER_HOME$/.virtualenvs/clowder2-Ai7Xc8E9/bin/python" />
<option name="SDK_NAME" value="Python 3.7 (clowder2-Ai7Xc8E9)" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/backend/app/tests" />
<option name="IS_MODULE_SDK" value="true" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
Expand All @@ -14,4 +15,4 @@
<option name="_new_targetType" value="&quot;PATH&quot;" />
<method v="2" />
</configuration>
</component>
</component>
11 changes: 6 additions & 5 deletions backend/app/routers/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,12 @@ async def get_project(
project_id: str,
):
if (
project := await ProjectDB.find_one(
ProjectDB.id == PydanticObjectId(project_id)
)
is not None
):
project := await ProjectDB.find_one(
Or(
ProjectDB.id == PydanticObjectId(project_id),
)
)
) is not None:
return project.dict()
raise HTTPException(status_code=404, detail=f"Project {project_id} not found")

Expand Down

0 comments on commit 91e14cb

Please sign in to comment.