mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-25 19:08:11 +08:00
ensure there is always an unassigned label in user created category (#1644)
This commit is contained in:
@@ -48,6 +48,10 @@ export const annotationCreateCategoryAction = (
|
||||
const col = catToDupDf.col(categoryToDuplicate);
|
||||
initialValue = col.asArray();
|
||||
({ categories } = col.summarize());
|
||||
// all user-created annotations must have the unassigned category
|
||||
if (!categories.includes(globals.unassignedCategoryLabel)) {
|
||||
categories.push(globals.unassignedCategoryLabel);
|
||||
}
|
||||
} else {
|
||||
/* else assign to the standard default value */
|
||||
initialValue = globals.unassignedCategoryLabel;
|
||||
|
||||
Reference in New Issue
Block a user