Skip to content

Commit

Permalink
Fix project-label query
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverroick committed Jan 5, 2024
1 parent 82ee762 commit 421fdd7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/api/buildQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ const projectFields = `
${cameraConfigFields}
}
labels {
categories
_id
name
color
source
}
availableMLModels
`
Expand Down
5 changes: 3 additions & 2 deletions src/features/filters/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ const updateAvailCamFilters = (state, camConfigs) => {
};

const updateAvailLabelFilters = (state, labels) => {
state.availFilters.labels.ids = labels.categories;
const noneFound = (labels.categories.length === 0);
const categories = labels.map(({ name }) => name);
state.availFilters.labels.ids = categories;
const noneFound = (categories.length === 0);
state.availFilters.labels.loadingState = {
isLoading: false,
operation: null,
Expand Down
2 changes: 1 addition & 1 deletion src/features/images/LabelPills.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ const LabelPills = ({ objects, imageIndex, focusIndex }) => {
)
};

export default LabelPills;
export default LabelPills;

0 comments on commit 421fdd7

Please sign in to comment.