Fix lỗi newsletter

Mình đã fix lỗi SQL khi đăng ký
This commit is contained in:
Tran Trong Nghia 2022-12-25 13:44:07 +07:00 committed by GitHub
parent 51ecaba048
commit 23ee47bb26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,8 +125,8 @@ class RegistrationView(OldRegistrationView):
profile.organizations.add(*cleaned_data["organizations"])
profile.save()
if newsletter_id is not None and cleaned_data["newsletter"]:
Subscription(user=user, newsletter_id=newsletter_id, subscribed=True).save()
#if newsletter_id is not None and cleaned_data["newsletter"]:
# Subscription(user=user, newsletter_id=newsletter_id, subscribed=True).save()
return user
def get_initial(self, *args, **kwargs):