Fixed a bug where a series with a relationship couldn't be deleted. (#1495)

This commit is contained in:
Joseph Milazzo 2022-09-01 11:46:13 -05:00 committed by GitHub
parent 9ee5ab97ef
commit 52ed5724e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -72,7 +72,9 @@ namespace API.Data
builder.Entity<SeriesRelation>()
.HasOne(pt => pt.TargetSeries)
.WithMany(t => t.RelationOf)
.HasForeignKey(pt => pt.TargetSeriesId);
.HasForeignKey(pt => pt.TargetSeriesId)
.OnDelete(DeleteBehavior.ClientCascade);
builder.Entity<AppUserPreferences>()
.Property(b => b.BookThemeName)