Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Salamander - API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Herman Andersen Dyrkorn
Salamander - API
Merge requests
!50
Resolve "refactor edit salamander"
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "refactor edit salamander"
47-refactor-edit-salamander
into
master
Overview
0
Commits
6
Pipelines
0
Changes
1
Merged
Herman Andersen Dyrkorn
requested to merge
47-refactor-edit-salamander
into
master
4 years ago
Overview
0
Commits
6
Pipelines
0
Changes
1
Closes
#47 (closed)
Edited
4 years ago
by
Herman Andersen Dyrkorn
0
0
Merge request reports
Viewing commit
11592532
Prev
Next
Show latest version
1 file
+
6
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
11592532
new bug fix at ssame problem
· 11592532
Herman Andersen Dyrkorn
authored
4 years ago
api/endpoints/editsalamander.py
+
6
−
5
View file @ 11592532
Edit in single-file editor
Open in Web IDE
Show full file
@@ -171,12 +171,13 @@ class EditSalamander(Resource):
path_to_original_image
=
original_path
,
path_to_processed_image
=
processed_path
)
else
:
add_salamander
(
salamander
.
id
,
image_id
,
data
[
'
new_location
'
],
data
[
'
new_species
'
],
data
[
'
new_sex
'
],
new_path_to_images
,
user_id
,
original_path
,
processed_path
)
new_id
=
add_salamander
(
salamander
.
id
,
image_id
,
data
[
'
new_location
'
],
data
[
'
new_species
'
],
data
[
'
new_sex
'
],
new_path_to_images
,
user_id
,
original_path
,
processed_path
)
return
handle_remaining_images
(
salamander
,
salamander_path
,
image_id
,
last_id
,
True
,
result
,
0
)
True
,
result
,
new_id
)
else
:
return
jsonify
(
{
"
message
"
:
"
Salamander image,
"
+
data
[
'
image_id
'
]
+
"
does not exist
"
,
Loading