diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-03-25 22:25:32 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-03-25 22:25:32 +0100 |
| commit | b44a70ff368f228fc27a184e2139d288bada85cc (patch) | |
| tree | 3612f517f0666761bc3f5765217e8fa4d8f64663 /Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs | |
| parent | 5024c52c60617fffc09ee7b6eeabe0ac400bae75 (diff) | |
Simplify/remove/clean code
* Remove useless runtime check (we only support one)
* Remove unused args
* Remove a global constant
And ofc fix some warnings ;)
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs index 3d60925da..47552806d 100644 --- a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs @@ -90,9 +90,10 @@ namespace Emby.Server.Implementations.Data { throw new ArgumentNullException(nameof(displayPreferences)); } + if (string.IsNullOrEmpty(displayPreferences.Id)) { - throw new ArgumentNullException(nameof(displayPreferences.Id)); + throw new ArgumentException("Display preferences has an invalid Id", nameof(displayPreferences)); } cancellationToken.ThrowIfCancellationRequested(); |
