mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-20 08:04:33 -04:00
[ENG-1546] Delete tag_on_object entries before the tag itself (so tags can be deleted) (#1944)
fix: delete `tag_on_object` entries before the tag itself
This commit is contained in:
1 file changed
+7
@@ -358,6 +358,13 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
|
||||
"delete",
|
||||
R.with2(library())
|
||||
.mutation(|(_, library), tag_id: i32| async move {
|
||||
library
|
||||
.db
|
||||
.tag_on_object()
|
||||
.delete_many(vec![tag_on_object::tag_id::equals(tag_id)])
|
||||
.exec()
|
||||
.await?;
|
||||
|
||||
library
|
||||
.db
|
||||
.tag()
|
||||
|
||||
Reference in new issue
Block a user