mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 11:14:27 +00:00
Fix delete functionality to use Scsi instead of Ssc in the List component
This commit is contained in:
@@ -126,12 +126,12 @@ public partial class List
|
||||
|
||||
private async Task DeleteAsync(int id)
|
||||
{
|
||||
await using DbContext ctx = await DbContextFactory.CreateDbContextAsync();
|
||||
CommonTypes.Metadata.Ssc? ssc = await ctx.Ssc.FindAsync(id);
|
||||
await using DbContext ctx = await DbContextFactory.CreateDbContextAsync();
|
||||
CommonTypes.Metadata.Scsi? scsi = await ctx.Scsi.FindAsync(id);
|
||||
|
||||
if(ssc is not null)
|
||||
if(scsi is not null)
|
||||
{
|
||||
ctx.Ssc.Remove(ssc);
|
||||
ctx.Scsi.Remove(scsi);
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user