]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: Handle JSON requests
authorStephen Finucane <stephen@that.guru>
Tue, 30 Apr 2019 06:03:02 +0000 (16:03 +1000)
committerStephen Finucane <stephen@that.guru>
Tue, 30 Apr 2019 17:36:44 +0000 (11:36 -0600)
commitb7aa6f1f62c56dade7dd524ebcba58546fb07f6b
treec753eadbff46d293d666765e3f639079035921c3
parentea9301b76d0fc67b02097cabebd23efbe52300e7
REST: Handle JSON requests

This was raising an attribute error when switching tests to use JSON
bodies instead of form-data.

  AttributeError: 'dict' object has no attribute '_mutable'

The easy fix is to check if it's a dictionary and avoid the mutability
check if so.

NOTE(daxtens): This is needed for JSON bodies sent by regular users, not
just the tests.

Signed-off-by: Stephen Finucane <stephen@that.guru>
(cherry picked from commit dc48fbce99efe7d13987a3f510f7dee389636eba)
patchwork/api/check.py