don't know how to fix the error The view images.views.image_create didn't return an HttpResponse object. It returned None instead

here is the code:

from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from .forms import ImageCreateForm


@login_required
def image_create(request):
  if request.method == 'POST':
    # форма отправлена
    form = ImageCreateForm(data=request.POST)
    if form.is_valid():
      # данные в форме валидны
      cd = form.cleaned_data
      new_image = form.save(commit=False)
      # назначить текущего пользователя элементу
      new_image.user = request.user
      new_image.save()
      messages.success(request,'Image added successfully')
      # перенаправить к представлению детальной
      # информации о только что созданном элементе
      return redirect(new_image.get_absolute_url())
    else:
      # скомпоновать форму с данными,
      # предоставленными букмарклетом методом GET
      form = ImageCreateForm(data=request.GET)
    return render(request,'images/image/create.html',{'section': 'images','form': form})

Side note: When posting code (or templates, error messages, tracebacks, etc), enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted. (I’ve taken the liberty of editing your original post. Please remember to do this in the future.)

Your view doesn’t return any response on a GET request to that view. That’s the likely cause of this error.