Skip to content

Commit

Permalink
fix(tags): tags were not created if the tag was not in the db
Browse files Browse the repository at this point in the history
  • Loading branch information
chikof committed Apr 12, 2024
1 parent 6f4c2fc commit 57e67a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/bot/services/tag.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ export class BotTagService implements OnModuleInit {
*/
public async ensureTagsExists(names: string[]): Promise<BotTagObject[]> {
// Get the existing tags.
const tags = await this.getTagsByName(names);
const tags: BotTagObject[] = await this.getTagsByName(names).catch(
() => []
);

// If the number of currente tags if not equal to the number of names, create the missing tags.
if (tags.length !== names.length) {
Expand Down

0 comments on commit 57e67a9

Please sign in to comment.