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
8159b2f6
Commit
8159b2f6
authored
2 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
fix item getter endpints
parent
b128a9c8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#697
failed
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/api/routes/annotations.py
+3
-3
3 additions, 3 deletions
server/api/routes/annotations.py
with
3 additions
and
3 deletions
server/api/routes/annotations.py
+
3
−
3
View file @
8159b2f6
...
...
@@ -109,7 +109,7 @@ async def get_next_assignment_for_scope_for_user(assignment_scope_id: str,
assignment_scope_id
=
assignment_scope_id
,
user_id
=
permissions
.
user
.
user_id
,
engine
=
db_engine
)
return
_construct_annotation_item
(
assignment
=
assignment
,
project_id
=
permissions
.
permissions
.
project_id
)
return
await
_construct_annotation_item
(
assignment
=
assignment
,
project_id
=
permissions
.
permissions
.
project_id
)
@router.get
(
'
/annotate/next/{assignment_scope_id}
'
,
response_model
=
AnnotationItem
)
...
...
@@ -119,7 +119,7 @@ async def get_next_open_assignment_for_scope_for_user(assignment_scope_id: str,
assignment
=
await
read_next_open_assignment_for_scope_for_user
(
assignment_scope_id
=
assignment_scope_id
,
user_id
=
permissions
.
user
.
user_id
,
engine
=
db_engine
)
return
_construct_annotation_item
(
assignment
=
assignment
,
project_id
=
permissions
.
permissions
.
project_id
)
return
await
_construct_annotation_item
(
assignment
=
assignment
,
project_id
=
permissions
.
permissions
.
project_id
)
@router.get
(
'
/annotate/assignment/{assignment_id}
'
,
response_model
=
AnnotationItem
)
...
...
@@ -131,7 +131,7 @@ async def get_assignment(assignment_id: str,
raise
HTTPException
(
status_code
=
http_status
.
HTTP_401_UNAUTHORIZED
,
detail
=
'
You do not have permission to handle this assignment, as it is not yours!
'
)
return
_construct_annotation_item
(
assignment
=
assignment
,
project_id
=
permissions
.
permissions
.
project_id
)
return
await
_construct_annotation_item
(
assignment
=
assignment
,
project_id
=
permissions
.
permissions
.
project_id
)
@router.get
(
'
/annotate/scopes/{project_id}
'
,
response_model
=
list
[
UserProjectAssignmentScope
])
...
...
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