0.7.5
fix subscribe_for_user
This commit is contained in:
@@ -42,6 +42,7 @@ def subscribe_now_ajax(request):
|
|||||||
subscribe_for_user = SubscribeForUser.objects.filter(user=request.user)
|
subscribe_for_user = SubscribeForUser.objects.filter(user=request.user)
|
||||||
if subscribe_for_user:
|
if subscribe_for_user:
|
||||||
subscribe_for_user.update(**kwargs)
|
subscribe_for_user.update(**kwargs)
|
||||||
|
subscribe_for_user = subscribe_for_user[0]
|
||||||
else:
|
else:
|
||||||
subscribe_for_user = SubscribeForUser.objects.create(**kwargs)
|
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'
|
tpl_name = 'blocks/profile/b_subscribe_variants.html'
|
||||||
else:
|
else:
|
||||||
tpl_name = 'blocks/profile/b_subscribe_current.html'
|
tpl_name = 'blocks/profile/b_subscribe_current.html'
|
||||||
|
subscribe_for_user = subscribe_for_user[0]
|
||||||
|
|
||||||
all_options = SubscribeOption.objects.filter(enable=True)
|
all_options = SubscribeOption.objects.filter(enable=True)
|
||||||
subscribes = Subscribe.objects.filter(enable=True)
|
subscribes = Subscribe.objects.filter(enable=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user