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
Resolve "refactor edit salamander"
Herman Andersen Dyrkorn
requested to merge
47-refactor-edit-salamander
into
master
Jun 10, 2021
Overview
0
Commits
6
Pipelines
0
Changes
1
Closes
#47 (closed)
Edited
Jun 10, 2021
by
Herman Andersen Dyrkorn
0
0
Merge request reports
Viewing commit
3724d2c8
Prev
Next
Show latest version
1 file
+
2
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
3724d2c8
fixed tiny bug in match for rematch
· 3724d2c8
andmag
authored
Jun 10, 2021
api/endpoints/editsalamander.py
+
2
−
1
View file @ 3724d2c8
Edit in single-file editor
Open in Web IDE
Show full file
@@ -170,6 +170,7 @@ class EditSalamander(Resource):
str
(
result
)),
path_to_original_image
=
original_path
,
path_to_processed_image
=
processed_path
)
new_id
=
result
else
:
new_id
=
add_salamander
(
salamander
.
id
,
image_id
,
data
[
'
new_location
'
],
data
[
'
new_species
'
],
@@ -211,7 +212,7 @@ def delete_growth_row(salamander_id, image_id):
db
.
session
.
commit
()
def
handle_remaining_images
(
salamander
,
salamander_path
:
str
,
image_id
:
int
,
last_id
:
int
,
match_bool
,
result
,
new_id
=
0
):
def
handle_remaining_images
(
salamander
,
salamander_path
:
str
,
image_id
:
int
,
last_id
:
int
,
match_bool
,
result
,
new_id
):
# if last image was moved:
if
len
(
os
.
listdir
(
salamander_path
))
==
0
:
os
.
rmdir
(
salamander_path
)
Loading