We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b97d9bf commit c77b168Copy full SHA for c77b168
1 file changed
exact/exact/users/views.py
@@ -345,7 +345,7 @@ def user(request, user_id):
345
346
if 'frontend' in request.POST and request.POST['frontend']:
347
if not hasattr(user,'prefs'):
348
- user.prefs = UserPreferences.objects.get_or_create(user=user)
+ user.prefs, _ = UserPreferences.objects.get_or_create(user=user)
349
350
user.prefs.frontend = int(request.POST['frontend'])
351
user.prefs.save()
0 commit comments