diff --git a/pinaxcon/registrasion/management/commands/dummy_presentations.py b/pinaxcon/registrasion/management/commands/dummy_presentations.py index a38b1bc8..93edabe6 100644 --- a/pinaxcon/registrasion/management/commands/dummy_presentations.py +++ b/pinaxcon/registrasion/management/commands/dummy_presentations.py @@ -1,3 +1,4 @@ +from django.contrib.auth.models import User from django.core.management.base import BaseCommand from symposion.conference.models import Section, current_conference @@ -15,12 +16,15 @@ class Command(BaseCommand): def handle(self, *args, **options): conf = current_conference() section = Section.objects.filter(conference=conf, slug="main").all().first() + + user = User.objects.first() speaker = Speaker.objects.first() + if not speaker: + speaker, _ = Speaker.objects.get_or_create(name="Dummy Speaker", + defaults={"user": user}) talk_kind = ProposalKind.objects.first() target_audience = TalkProposal.TARGET_USER - print(talk_kind) - for i in range(1000, 1020): prop, _created = TalkProposal.objects.get_or_create( pk=i, kind=talk_kind, speaker=speaker, target_audience=target_audience,