Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Herman Andersen Dyrkorn
Salamander - API
Commits
3724d2c8
Commit
3724d2c8
authored
Jun 10, 2021
by
andmag
Browse files
fixed tiny bug in match for rematch
parent
34005d63
Changes
1
Hide whitespace changes
Inline
Side-by-side
api/endpoints/editsalamander.py
View file @
3724d2c8
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment