|
|
@@ -59,7 +59,9 @@ export class ChatRoleService {
|
|
|
|
|
|
public async create(chatRoleDto: ChatRoleDto) {
|
|
|
const result = await this.chatRoleRepository.save(chatRoleDto)
|
|
|
- this.labelService.addRoleLabel(result.id, chatRoleDto.labelList)
|
|
|
+ if (Array.isArray(chatRoleDto.labelList) && chatRoleDto.labelList.length > 0) {
|
|
|
+ this.labelService.addRoleLabel(result.id, chatRoleDto.labelList)
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|