Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NACSOS Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MCC APSIS
NACSOS
NACSOS Core
Commits
2a87d4af
Commit
2a87d4af
authored
2 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
resolve pipeline
parent
c4eb14d2
No related branches found
Branches containing commit
No related tags found
2 merge requests
!15
Master
,
!5
add endpoint for creating project (slightly redundant to PUT /project/info)
Pipeline
#952
passed
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/api/routes/annotations.py
+5
-1
5 additions, 1 deletion
server/api/routes/annotations.py
server/api/routes/projects.py
+2
-2
2 additions, 2 deletions
server/api/routes/projects.py
with
7 additions
and
3 deletions
server/api/routes/annotations.py
+
5
−
1
View file @
2a87d4af
from
typing
import
TYPE_CHECKING
from
pydantic
import
BaseModel
from
sqlalchemy
import
select
from
sqlalchemy.orm
import
load_only
from
sqlalchemy.ext.asyncio
import
AsyncSession
from
fastapi
import
APIRouter
,
Depends
,
HTTPException
,
status
as
http_status
,
Query
from
nacsos_data.db.schemas
import
\
...
...
@@ -71,6 +72,9 @@ from server.api.errors import \
from
server.util.security
import
UserPermissionChecker
from
server.data
import
db_engine
if
TYPE_CHECKING
:
from
sqlalchemy.ext.asyncio
import
AsyncSession
# noqa F401
router
=
APIRouter
()
...
...
This diff is collapsed.
Click to expand it.
server/api/routes/projects.py
+
2
−
2
View file @
2a87d4af
...
...
@@ -14,7 +14,7 @@ from server.util.security import get_current_active_user, get_current_active_sup
from
server.util.logging
import
get_logger
if
TYPE_CHECKING
:
from
sqlalchemy.ext.asyncio
import
AsyncSession
from
sqlalchemy.ext.asyncio
import
AsyncSession
# noqa F401
logger
=
get_logger
(
'
nacsos.api.route.projects
'
)
router
=
APIRouter
()
...
...
@@ -48,4 +48,4 @@ async def create_project(project: ProjectModel,
project
.
project_id
=
str
(
uuid
.
uuid4
())
session
.
add
(
Project
(
**
project
.
dict
()))
await
session
.
commit
()
return
project
.
project_id
return
str
(
project
.
project_id
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment