Skip to content

Commit

Permalink
Fixed: Province field can have more than 2 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Sureiya committed Nov 25, 2013
1 parent 3058b71 commit 2a9a521
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django_clickbank/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.db import models
from django.conf import settings
from django_clickbank.signals import *
import logging

logger = logging.getLogger('django_clickbank.notifications')

class ClickBankModel(models.Model):
class Meta:
Expand Down Expand Up @@ -133,7 +136,7 @@ class Notification(ClickBankModel):
full_name = models.CharField(max_length=510)
first_name = models.CharField(max_length=255, blank=True, null=True)
last_name = models.CharField(max_length=255, blank=True, null=True)
province = models.CharField(max_length=2, blank=True, null=True)
province = models.CharField(max_length=255, blank=True, null=True)
postal_code = models.CharField(max_length=16, blank=True, null=True)
city = models.CharField(max_length=255, blank=True, null=True)
country = models.CharField(max_length=255, blank=True, null=True)
Expand Down Expand Up @@ -205,6 +208,7 @@ def send_signals(self):
""" Send out neccesary signals on post_save or update """

if self.transaction_type in ('SALE', 'TEST_SALE'):
logging.debug('Sending Notification: {0}'.format(sale))
sale.send(sender=self)

elif self.transaction_type == 'BILL':
Expand Down

0 comments on commit 2a9a521

Please sign in to comment.