Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
0d7fca9b
Commit
0d7fca9b
authored
2 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Fix logic error
parent
0e7e5933
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/contributions/routes.py
+16
-4
16 additions, 4 deletions
app/contributions/routes.py
with
16 additions
and
4 deletions
app/contributions/routes.py
+
16
−
4
View file @
0d7fca9b
...
@@ -124,7 +124,10 @@ def delete_spacy_model(spacy_nlp_pipeline_model_id):
...
@@ -124,7 +124,10 @@ def delete_spacy_model(spacy_nlp_pipeline_model_id):
snpm
=
SpaCyNLPPipelineModel
.
query
.
get
(
spacy_nlp_pipeline_model_id
)
snpm
=
SpaCyNLPPipelineModel
.
query
.
get
(
spacy_nlp_pipeline_model_id
)
if
snpm
is
None
:
if
snpm
is
None
:
resonse_data
=
{
resonse_data
=
{
'
message
'
:
f
'"
{
snpm
.
title
}
"
not found
'
,
'
message
'
:
(
'
SpaCy NLP Pipeline Model with id
'
f
'
"
{
spacy_nlp_pipeline_model_id
}
"
not found
'
),
'
category
'
:
'
error
'
'
category
'
:
'
error
'
}
}
response
=
jsonify
(
resonse_data
)
response
=
jsonify
(
resonse_data
)
...
@@ -169,7 +172,10 @@ def update_spacy_nlp_pipeline_model_is_public(spacy_nlp_pipeline_model_id):
...
@@ -169,7 +172,10 @@ def update_spacy_nlp_pipeline_model_is_public(spacy_nlp_pipeline_model_id):
snpm
=
SpaCyNLPPipelineModel
.
query
.
get
(
spacy_nlp_pipeline_model_id
)
snpm
=
SpaCyNLPPipelineModel
.
query
.
get
(
spacy_nlp_pipeline_model_id
)
if
snpm
is
None
:
if
snpm
is
None
:
resonse_data
=
{
resonse_data
=
{
'
message
'
:
f
'"
{
snpm
.
title
}
"
not found
'
,
'
message
'
:
(
'
SpaCy NLP Pipeline Model with id
'
f
'
"
{
spacy_nlp_pipeline_model_id
}
"
not found
'
),
'
category
'
:
'
error
'
'
category
'
:
'
error
'
}
}
response
=
jsonify
(
resonse_data
)
response
=
jsonify
(
resonse_data
)
...
@@ -283,7 +289,10 @@ def delete_tesseract_model(tesseract_ocr_pipeline_model_id):
...
@@ -283,7 +289,10 @@ def delete_tesseract_model(tesseract_ocr_pipeline_model_id):
topm
=
TesseractOCRPipelineModel
.
query
.
get
(
tesseract_ocr_pipeline_model_id
)
topm
=
TesseractOCRPipelineModel
.
query
.
get
(
tesseract_ocr_pipeline_model_id
)
if
topm
is
None
:
if
topm
is
None
:
resonse_data
=
{
resonse_data
=
{
'
message
'
:
f
'"
{
topm
.
title
}
"
not found
'
,
'
message
'
:
(
'
Tesseract OCR Pipeline Model with id
'
f
'
"
{
tesseract_ocr_pipeline_model_id
}
"
not found
'
),
'
category
'
:
'
error
'
'
category
'
:
'
error
'
}
}
response
=
jsonify
(
resonse_data
)
response
=
jsonify
(
resonse_data
)
...
@@ -328,7 +337,10 @@ def update_tesseract_ocr_pipeline_model_is_public(tesseract_ocr_pipeline_model_i
...
@@ -328,7 +337,10 @@ def update_tesseract_ocr_pipeline_model_is_public(tesseract_ocr_pipeline_model_i
topm
=
TesseractOCRPipelineModel
.
query
.
get
(
tesseract_ocr_pipeline_model_id
)
topm
=
TesseractOCRPipelineModel
.
query
.
get
(
tesseract_ocr_pipeline_model_id
)
if
topm
is
None
:
if
topm
is
None
:
resonse_data
=
{
resonse_data
=
{
'
message
'
:
f
'"
{
topm
.
title
}
"
not found
'
,
'
message
'
:
(
'
Tesseract OCR Pipeline Model with id
'
f
'
"
{
tesseract_ocr_pipeline_model_id
}
"
not found
'
),
'
category
'
:
'
error
'
'
category
'
:
'
error
'
}
}
response
=
jsonify
(
resonse_data
)
response
=
jsonify
(
resonse_data
)
...
...
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