wizarrrr / wizarr

Wizarr is an advanced user invitation and management system for Jellyfin, Plex, Emby etc.
https://docs.wizarr.dev
MIT License
1.17k stars 86 forks source link

IntegrityError: NOT NULL constraint failed: users.email #352

Closed wizarr-sentry[bot] closed 3 months ago

wizarr-sentry[bot] commented 3 months ago

Sentry Issue: WIZARR-BACKEND-R

IntegrityError: NOT NULL constraint failed: users.email
  File "peewee.py", line 3252, in execute_sql
    cursor.execute(sql, params or ())

IntegrityError: NOT NULL constraint failed: users.email
(11 additional frame(s) were not displayed)
...
  File "app/scheduler.py", line 60, in scan_users
    global_sync_users_to_media_server()
  File "helpers/universal.py", line 217, in global_sync_users_to_media_server
    sync_jellyfin_users()
  File "helpers/jellyfin.py", line 369, in sync_jellyfin_users
    create_user(username=jellyfin_user["Name"], token=jellyfin_user["Id"])
  File "helpers/users.py", line 162, in create_user
    user: Users = Users.create(**user_model)

Job "<Job (id=syncUsers name=scan_users)>" raised an exception
JamsRepos commented 3 months ago

Issue is caused by Guest accounts and Plex Home accounts. It seems they do not have emails.

MrDynamo commented 3 months ago

Linking #322

MrDynamo commented 3 months ago

Fixed in #357