From 43a0260cd8cbf691866e44a05cd36287d32cf965 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 13 Jan 2023 22:38:55 +1100 Subject: Fix guild delete failing when template exists --- src/util/entities/Template.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/entities/Template.ts') diff --git a/src/util/entities/Template.ts b/src/util/entities/Template.ts index 1d952283..7975e731 100644 --- a/src/util/entities/Template.ts +++ b/src/util/entities/Template.ts @@ -36,7 +36,7 @@ export class Template extends BaseClass { source_guild_id: string; @JoinColumn({ name: "source_guild_id" }) - @ManyToOne(() => Guild) + @ManyToOne(() => Guild, { onDelete: "CASCADE" }) source_guild: Guild; @Column({ type: "simple-json" }) -- cgit 1.4.1