Commits

Victor Gavro committed b7bb442

minor fixes

Comments (0)

Files changed (2)

smsgate/__init__.py

     See smsgate.send_sms function for details.
     '''
     if len(datatuple) == 0:
-        return []
+        return
     callback_url = _get_callback_url(callback)
     try:
         if hasattr(backend, 'send_mass_sms'):
     If fail_silently is True, all exceptions are suppressed.
     '''
     if len(remote_ids) == 0:
-        return []
+        return
     try:
         for result in backend.get_sms_statuses(remote_ids):
             yield result

smsgate/models.py

         '''
         datatuple = []
         recipients_lists = []
-        for sms in Sms.objects.filter(recipients__status__in: statuses).distinct():
-            recipients = sms.recipients.filter(status__in: statuses)
+        for sms in Sms.objects.filter(recipients__status__in = statuses).distinct():
+            recipients = sms.recipients.filter(status__in = statuses)
             datatuple.append((
                 sms.text,
                 [r.phone for r in recipients],
         (STATUS_EXPIRED, _('Expired')),
     )
     phone = models.CharField(_('Phone number'), max_length=12,
-                             validators=(phone_validator,))
+                             validators=[phone_validator,])
     remote_id = models.CharField(_('Remote id'), max_length=32, editable=False)
     status = models.SmallIntegerField(_('Status'), choices=STATUS_CHOICES,
                                       default=STATUS_QUEUED)