def handle(self, *args, **options):
"""
Make it happen.
"""
super(Command, self).handle(*args, **options)
if not CandidateContest.objects.exists():
error_message = 'No contests currently loaded (run loadocdcandidatecontests).'
if self._called_from_command_line:
self.failure(error_message)
else:
raise CommandError(error_message)
else:
form501_count = Form501Filing.objects.without_candidacy().count()
self.header(
"Processing %s Form 501 filings without candidacies" % form501_count
)
self.load()
self.success("Done!")
loadocdcandidaciesfrom501s.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录