Skip to content

Commit

Permalink
Remove validation check: SeriesName is null . At least 1 exception fo…
Browse files Browse the repository at this point in the history
…und in the wild
  • Loading branch information
rmcrackan committed Feb 29, 2024
1 parent 3f4604e commit d3f0fd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/AppScaffolding/AppScaffolding.csproj
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>11.3.4.1</Version>
<Version>11.3.5.1</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Octokit" Version="9.1.0" />
Expand Down
6 changes: 4 additions & 2 deletions Source/AudibleUtilities/AudibleApiValidators.cs
Expand Up @@ -90,8 +90,10 @@ public IEnumerable<Exception> Validate(IEnumerable<Item> items)
var distinct = items.GetSeriesDistinct();
if (distinct.Any(s => s.SeriesId is null))
exceptions.Add(new ArgumentException($"Collection contains {nameof(Item.Series)} with null {nameof(Series.SeriesId)}", nameof(items)));
if (distinct.Any(s => s.SeriesName is null))
exceptions.Add(new ArgumentException($"Collection contains {nameof(Item.Series)} with null {nameof(Series.SeriesName)}", nameof(items)));

//// unfortunately, a user has a series with no name
//if (distinct.Any(s => s.SeriesName is null))
// exceptions.Add(new ArgumentException($"Collection contains {nameof(Item.Series)} with null {nameof(Series.SeriesName)}", nameof(items)));

return exceptions;
}
Expand Down

0 comments on commit d3f0fd7

Please sign in to comment.