Make Anilist missing username error more reliable, allow editing anilist username in settings panel

This commit is contained in:
Timothy Warren 2019-07-11 10:28:09 -04:00
parent bce1afa546
commit 038e61bf37
2 changed files with 1 additions and 2 deletions

View File

@ -100,7 +100,7 @@ final class Model
$config = $this->container->get('config'); $config = $this->container->get('config');
$anilistUser = $config->get(['anilist', 'username']); $anilistUser = $config->get(['anilist', 'username']);
if ( ! \is_string($anilistUser)) if ( ! (is_string($anilistUser) && $anilistUser !== ''))
{ {
throw new InvalidArgumentException('Anilist username is not defined in config'); throw new InvalidArgumentException('Anilist username is not defined in config');
} }

View File

@ -61,7 +61,6 @@ const SETTINGS_MAP = [
'type' => 'string', 'type' => 'string',
'title' => 'Anilist Username', 'title' => 'Anilist Username',
'default' => '', 'default' => '',
'readonly' => TRUE,
'description' => 'Login username for Anilist account to integrate with', 'description' => 'Login username for Anilist account to integrate with',
], ],
'access_token' => [ 'access_token' => [