diff --git a/cfp/views.py b/cfp/views.py index 200d159..5e1a89c 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -359,8 +359,8 @@ def proposal_speaker_remove(request, speaker, talk_id, co_speaker_id): # BACKWARD COMPATIBILITY def talk_proposal(request, talk_id=None, participant_id=None): if talk_id and participant_id: - talk = get_object_or_404(Talk, token=talk_id, site=site) - speaker = get_object_or_404(Participant, token=participant_id, site=site) + talk = get_object_or_404(Talk, token=talk_id, site=request.conference.site) + speaker = get_object_or_404(Participant, token=participant_id, site=request.conference.site) return render(reverse('proposal-talk-edit', kwargs=dict(speaker_token=speaker.token, talk_id=talk.pk))) else: return render(reverse('proposal-home')) @@ -369,11 +369,11 @@ def talk_proposal(request, talk_id=None, participant_id=None): # BACKWARD COMPATIBILITY def talk_proposal_speaker_edit(request, talk_id, participant_id=None): talk = get_object_or_404(Talk, token=talk_id, site=request.conference.site) - speaker = talk.speakers.first() # no other choice here… if participant_id: - co_speaker = get_object_or_404(Participant, token=participant_id, site=request.conference.site) - return redirect(reverse('proposal-speaker-edit', kwargs=dict(speaker_token=speaker.token, talk_id=talk.pk, co_speaker_id=co_speaker.pk))) + speaker = get_object_or_404(Participant, token=participant_id, site=request.conference.site) + return redirect(reverse('proposal-profile-edit', kwargs=dict(speaker_token=speaker.token))) else: + speaker = talk.speakers.first() # no other choice here… return redirect(reverse('proposal-speaker-add', kwargs=dict(speaker_token=speaker.token, talk_id=talk.pk)))