removed unnecessary count

This commit is contained in:
Gani Georgiev committed 2025-01-17 15:58:57 +02:00
1 parent 0798b5ccbb
commit c70ca97888
3 files changed
+4 -29

No files matched your search

+2 -2
View File
@@ -206,9 +206,9 @@ func (app *BaseApp) IsCollectionNameUnique(name string, excludeIds ...string) bo
query.AndWhere(dbx.NotIn("id", list.ToInterfaceSlice(uniqueExcludeIds)...))
}
var exists bool
var total int
return query.Row(&exists) == nil && !exists
return query.Row(&total) == nil && total == 0
}
// TruncateCollection deletes all records associated with the provided collection.