Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings page throws exception #55

Open
gerroon opened this issue Dec 31, 2018 · 7 comments
Open

Settings page throws exception #55

gerroon opened this issue Dec 31, 2018 · 7 comments

Comments

@gerroon
Copy link

gerroon commented Dec 31, 2018

MultipleObjectsReturned at /settings/

get() returned more than one UserPreferenceModel -- it returned 2!

Request Method: GET
Request URL: http://192.168.1.100:8001/settings/
Django Version: 2.1.4
Exception Type: MultipleObjectsReturned
Exception Value:

get() returned more than one UserPreferenceModel -- it returned 2!

Exception Location: /media/VIDEO/ytsm/.env/lib/python3.7/site-packages/django/db/models/query.py in get, line 403
Python Executable: /media/VIDEO/ytsm/.env/bin/python3
Python Version: 3.7.2
Python Path:

['/media/VIDEO/ytsm/app',
'/usr/lib/python37.zip',
'/usr/lib/python3.7',
'/usr/lib/python3.7/lib-dynload',
'/media/VIDEO/ytsm/.env/lib/python3.7/site-packages']

Server time: Mon, 31 Dec 2018 02:59:50 +0000

@chibicitiberiu
Copy link
Owner

chibicitiberiu commented Dec 31, 2018

That's odd, it seems that the django_dynamic_preferences module messed up somehow and added 2 entries for the same preference for the same user. To fix this issue, you should manually edit the database using an SQLite editor tool. If it happens again, it might be a bug in django_dynamic_preferences, and we should discuss with them.

@gerroon
Copy link
Author

gerroon commented Dec 31, 2018

thanks I will try it

@gerroon
Copy link
Author

gerroon commented Dec 31, 2018

So what do I do witht he sql database editor to remove this error? I do not know what I am going to edit. I cant seem to save settings

@chibicitiberiu
Copy link
Owner

chibicitiberiu commented Dec 31, 2018 via email

@gerroon
Copy link
Author

gerroon commented Dec 31, 2018

See this

Not sure how I delete those, I do not see a delete button anywhere

image

@chibicitiberiu
Copy link
Owner

mark_deleted_as_watched and download_autogenerated_subtitles seem to be the problem. Make a backup of the database just in case, and delete the duplicates. See if you can access settings after that.

@gerroon
Copy link
Author

gerroon commented Dec 31, 2018

ok initial test works after the edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants