From e3ab5f43fdf152abbea88b99cae493ed695c9c89 Mon Sep 17 00:00:00 2001 From: Bryon Lewis Date: Tue, 29 Oct 2024 14:38:10 -0400 Subject: [PATCH] allowing removal of single species Id --- bats_ai/core/views/recording.py | 2 +- client/src/components/SpectrogramViewer.vue | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bats_ai/core/views/recording.py b/bats_ai/core/views/recording.py index e7c892c..007c0b2 100644 --- a/bats_ai/core/views/recording.py +++ b/bats_ai/core/views/recording.py @@ -579,7 +579,7 @@ def patch_annotation( annotation_instance.save() # Clear existing species associations - if species_ids: + if species_ids is not None: annotation_instance.species.clear() # Add species to the annotation based on the provided species_ids for species_id in species_ids: diff --git a/client/src/components/SpectrogramViewer.vue b/client/src/components/SpectrogramViewer.vue index af8ec5b..a9e62dc 100644 --- a/client/src/components/SpectrogramViewer.vue +++ b/client/src/components/SpectrogramViewer.vue @@ -50,7 +50,6 @@ export default defineComponent({ const imageCursorRef: Ref = ref(); const tileURL = props.spectroInfo.spectroId ? `${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/v1/dynamic/spectrograms/${props.spectroInfo.spectroId}/tiles/{z}/{x}/{y}.png/` : ""; const setCursor = (newCursor: string) => { - console.log(`Setting Cursor: ${newCursor}`); cursor.value = newCursor; };