def create_series_note(request): """ Post a note to an series.""" if request.method == "POST": form = SeriesNoteForm(request.POST or None) if form.is_valid(): series_id = request.POST.get('series') series = get_object_or_404(Series, pk=series_id) seriesnote = form.save(commit=False) seriesnote.owner = request.user seriesnote.series = series seriesnote.save() return redirect('series_detail', pk=series.id)
def create_series_note(request): """ Post a note to an series.""" if request.method == "POST": form = SeriesNoteForm(request.POST or None) if form.is_valid(): series_id = request.POST.get('series') series = get_object_or_404(Series, pk=series_id) seriesnote = form.save(commit=False) seriesnote.owner = request.user seriesnote.organization = request.user.organization seriesnote.series = series seriesnote.save() # record action for activity story_team action.send(request.user, verb="added note", action_object=seriesnote, target=series) return redirect('series_detail', pk=series.id)