mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Added some defensive coding around when we create an artist for #2915
This commit is contained in:
parent
6dccea77c2
commit
ca010a0282
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using EnsureThat;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Ombi.Api.Lidarr;
|
using Ombi.Api.Lidarr;
|
||||||
using Ombi.Api.Lidarr.Models;
|
using Ombi.Api.Lidarr.Models;
|
||||||
|
@ -87,6 +88,11 @@ namespace Ombi.Core.Senders
|
||||||
|
|
||||||
if (artist == null || artist.id <= 0)
|
if (artist == null || artist.id <= 0)
|
||||||
{
|
{
|
||||||
|
EnsureArg.IsNotNullOrEmpty(model.ForeignArtistId, nameof(model.ForeignArtistId));
|
||||||
|
EnsureArg.IsNotNullOrEmpty(model.ForeignAlbumId, nameof(model.ForeignAlbumId));
|
||||||
|
EnsureArg.IsNotNullOrEmpty(model.ArtistName, nameof(model.ArtistName));
|
||||||
|
EnsureArg.IsNotNullOrEmpty(rootFolderPath, nameof(rootFolderPath));
|
||||||
|
|
||||||
// Create artist
|
// Create artist
|
||||||
var newArtist = new ArtistAdd
|
var newArtist = new ArtistAdd
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue