Skip to content

Commit

Permalink
fix subscription bug
Browse files Browse the repository at this point in the history
  • Loading branch information
asennoussi committed Oct 29, 2023
1 parent fa02c7e commit a68a638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def form_valid(self, form):
# Check if user is not subscribed and handle the subscription logic here
if self.object.subscription_status not in ['subscribed']:
# Your subscription logic goes here. You might want to call an external API, charge the user, etc.
self.object.subscription_status = 'subscribed' # For now, just setting the status
# self.object.subscription_status = 'subscribed' # For now, just setting the status
pass
messages.success(self.request, "User details updated successfully!")
return super().form_valid(form)

0 comments on commit a68a638

Please sign in to comment.