mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
fix bug with adding labels
This commit is contained in:
parent
e3479fc0fa
commit
a242d8ba17
@ -4,7 +4,6 @@ import DatabaseService, { OnCreate } from './DatabaseService';
|
||||
import CreateBy from '../Types/Database/CreateBy';
|
||||
import QueryHelper from '../Types/Database/QueryHelper';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
|
||||
export class Service extends DatabaseService<Model> {
|
||||
public constructor(postgresDatabase?: PostgresDatabase) {
|
||||
@ -19,12 +18,6 @@ export class Service extends DatabaseService<Model> {
|
||||
existingProjectWithSameNameCount = (
|
||||
await this.countBy({
|
||||
query: {
|
||||
_id:
|
||||
createBy.props.userGlobalAccessPermission?.projectIds.map(
|
||||
(item: ObjectID) => {
|
||||
return item.toString();
|
||||
}
|
||||
) || [],
|
||||
name: QueryHelper.findWithSameText(createBy.data.name!),
|
||||
projectId: createBy.props.tenantId!,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user