- if not Submission.objects.filter(email=confirmation.email).exists():
- args = {}
- for attr in ['first_name', 'last_name', 'email', 'contact']:
- args[attr] = getattr(confirmation, attr)
- Submission.create(**args)
- new += 1
- else:
- self.stdout.write('skipping ' + confirmation.email + ': already exists.')
- skipped += 1
+ args = {}
+ for attr in ['first_name', 'last_name', 'email', 'contact']:
+ args[attr] = getattr(confirmation, attr)
+ Submission.create(**args)
+ new += 1