skip emailing if user account doesn't exist on idp

Closes #6186
This commit is contained in:
Serghei Mihai 2014-12-22 05:16:31 +01:00
parent c99f564902
commit 7a4fbf21e9
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,8 @@ class Command(BaseCommand):
response = requests.get(url)
try:
data = response.json()['data']
if not data:
raise ValueError
except (KeyError, ValueError):
continue
attachment = os.path.join(settings.INVOICES_DIR, 'facture_%s.pdf' % invoice.id)