diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2021-08-18 22:04:04 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-18 22:04:04 +0900 |
| commit | 881b914c6a7bdf73ed16194e71aa779b27de074e (patch) | |
| tree | 9915f6423c771ed4120bd7d5741780221b7a463c /src/models | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | sharkey-881b914c6a7bdf73ed16194e71aa779b27de074e.tar.gz sharkey-881b914c6a7bdf73ed16194e71aa779b27de074e.tar.bz2 sharkey-881b914c6a7bdf73ed16194e71aa779b27de074e.zip | |
チャンネルを作成しているとアカウントを削除できないのを修正 (#7653)
* チャンネルを作成しているとアカウントを削除できないのを修正
* CHANGELOG
* nullable
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/entities/channel.ts | 3 | ||||
| -rw-r--r-- | src/models/repositories/channel.ts | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/models/entities/channel.ts b/src/models/entities/channel.ts index 1868f75143..f2d713612d 100644 --- a/src/models/entities/channel.ts +++ b/src/models/entities/channel.ts @@ -23,9 +23,10 @@ export class Channel { @Index() @Column({ ...id(), + nullable: true, comment: 'The owner ID.' }) - public userId: User['id']; + public userId: User['id'] | null; @ManyToOne(type => User, { onDelete: 'SET NULL' diff --git a/src/models/repositories/channel.ts b/src/models/repositories/channel.ts index 3a6bd4c923..007b110015 100644 --- a/src/models/repositories/channel.ts +++ b/src/models/repositories/channel.ts @@ -90,7 +90,7 @@ export const packedChannelSchema = { }, userId: { type: 'string' as const, - nullable: false as const, optional: false as const, + nullable: true as const, optional: false as const, format: 'id', }, }, |