diff --git a/SubscribesApp/js_views.py b/SubscribesApp/js_views.py index 6ca154a..d2a1d33 100644 --- a/SubscribesApp/js_views.py +++ b/SubscribesApp/js_views.py @@ -42,6 +42,7 @@ def subscribe_now_ajax(request): subscribe_for_user = SubscribeForUser.objects.filter(user=request.user) if subscribe_for_user: subscribe_for_user.update(**kwargs) + subscribe_for_user = subscribe_for_user[0] else: subscribe_for_user = SubscribeForUser.objects.create(**kwargs) @@ -84,6 +85,7 @@ def show_cur_subscribe_ajax(request): tpl_name = 'blocks/profile/b_subscribe_variants.html' else: tpl_name = 'blocks/profile/b_subscribe_current.html' + subscribe_for_user = subscribe_for_user[0] all_options = SubscribeOption.objects.filter(enable=True) subscribes = Subscribe.objects.filter(enable=True)