Commit 6256a38d authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

views/patch: Read the GET params even when using other HTTP method

When creating a bundle or changing patch status a POST request is made.
This caused the whole section that handled navigation to be omitted,
which resulted in missing navigation links.

Let's drop the method checks there.
Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent a02262dd
Pipeline #22619 passed with stage
in 1 minute and 27 seconds
......@@ -40,16 +40,15 @@ def patch(request, patch_id):
current_revision = None
if request.method == 'GET':
series = request.GET.get('series', None)
rev = request.GET.get('rev', None)
if series and rev:
try:
current_revision = SeriesRevision.objects.get(
series_id=int(series),
version=int(rev))
except Exception:
raise Http404("Wrong series/revision")
series = request.GET.get('series', None)
rev = request.GET.get('rev', None)
if series and rev:
try:
current_revision = SeriesRevision.objects.get(
series_id=int(series),
version=int(rev))
except Exception:
raise Http404("Wrong series/revision")
if editable:
form = PatchForm(instance=patch)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment