Skip to content

Commit

Permalink
Remove unused navigation properties
Browse files Browse the repository at this point in the history
Primarily removed to avoid serialisation issue but they are reduntant.
  • Loading branch information
donaldgray committed May 15, 2024
1 parent b150ef8 commit 93a0db2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions src/protagonist/DLCS.Model/Assets/ImageDeliveryChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ public class ImageDeliveryChannel
/// The image id for the attached asset
/// </summary>
public AssetId ImageId { get; set; }

public Asset Asset { get; set; }

/// <summary>
/// The channel this policy applies to
Expand Down
5 changes: 0 additions & 5 deletions src/protagonist/DLCS.Model/Policies/DeliveryChannelPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ public class DeliveryChannelPolicy
/// The custom policy
/// </summary>
public string PolicyData { get; set; }

/// <summary>
/// List of delivery channels attached to the image
/// </summary>
public List<ImageDeliveryChannel> ImageDeliveryChannels { get; set; }
}

public static class KnownDeliveryChannelPolicies
Expand Down
2 changes: 1 addition & 1 deletion src/protagonist/DLCS.Repository/DlcsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
aId => aId.ToString(),
id => AssetId.FromString(id));
entity.HasOne(e => e.Asset)
entity.HasOne<Asset>()
.WithMany(e => e.ImageDeliveryChannels)
.HasForeignKey(e => e.ImageId);
});
Expand Down

0 comments on commit 93a0db2

Please sign in to comment.