Skip to content

Commit 8c87cef

Browse files
authored
update species id references to species pk (#478)
* update species id references to species pk * remove logging * update other id to pk references
1 parent 8017b8f commit 8c87cef

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

client/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface Species {
4646
common_name: string;
4747
species_code_6?: string;
4848
species?: string;
49-
id: number;
49+
pk: number;
5050
category: "single" | "multiple" | "frequency" | "noid";
5151
in_range?: boolean;
5252
}

client/src/components/AnnotationEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default defineComponent({
5959
speciesEdit.value.forEach((item) => {
6060
const found = props.species.find((specie) => specie.species_code === item);
6161
if (found) {
62-
speciesIds.push(found.id);
62+
speciesIds.push(found.pk);
6363
}
6464
});
6565
const updateType = type.value.join('+');

client/src/components/RecordingAnnotationEditor.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ export default defineComponent({
7979
speciesEdit.value.forEach((item) => {
8080
const found = props.species.find((specie) => specie.species_code === item);
8181
if (found) {
82-
speciesIds.push(found.id);
82+
speciesIds.push(found.pk);
8383
}
8484
});
85-
8685
const updateAnnotation: UpdateFileAnnotation & { apiToken?: string } = {
8786
recordingId: props.recordingId,
8887
comments: comments.value,

client/src/components/SpeciesNABatSave.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default defineComponent({
137137
<v-radio
138138
v-for="species in filteredSpecies"
139139
:key="species.species_code"
140-
:value="species.id"
140+
:value="species.pk"
141141
style="border: 1px solid black"
142142
>
143143
<template #label>

0 commit comments

Comments
 (0)