Commit e23f20cf authored by fred's avatar fred

use class to access to manager

parent 2587edbe
......@@ -38,7 +38,7 @@ class Subscriber(models.Model) :
return self.email
def save(self, *args, **kwargs):
existing_subscriber = self.objects.filter(email=self.email).first()
existing_subscriber = Subscriber.objects.filter(email=self.email).first()
if existing_subscriber and existing_subscriber.id != self.id:
# reset existing subscriber
existing_subscriber.is_validated = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment