diff --git a/mediarepo-daemon/mediarepo-logic/src/dao/tag/add.rs b/mediarepo-daemon/mediarepo-logic/src/dao/tag/add.rs index 602a7ea..e910fe5 100644 --- a/mediarepo-daemon/mediarepo-logic/src/dao/tag/add.rs +++ b/mediarepo-daemon/mediarepo-logic/src/dao/tag/add.rs @@ -132,6 +132,8 @@ fn build_tag_condition(tag: AddTagDto) -> Condition { .add(tag::Column::Name.eq(tag.name)) .add(namespace::Column::Name.eq(namespace)) } else { - Condition::all().add(tag::Column::Name.eq(tag.name)) + Condition::all() + .add(tag::Column::Name.eq(tag.name)) + .add(tag::Column::NamespaceId.is_null()) } }