]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: A check must specify a state
authorDaniel Axtens <dja@axtens.net>
Tue, 30 Apr 2019 06:03:04 +0000 (16:03 +1000)
committerStephen Finucane <stephen@that.guru>
Tue, 30 Apr 2019 17:37:53 +0000 (11:37 -0600)
commit233e6849f636c67048ef81290d48a168f7d1c766
treedf4c7272a31e01624b063a74670238ca1bccb53c
parentd963655ccd89c68648dbe3b2843a4a7b06aa78ce
REST: A check must specify a state

The Ozlabs crew noticed that a check without a state caused a
KeyError in data['state']. Mark state as mandatory, check for
it, and add a test.

NOTE(daxtens): Swagger changes are excluded from the backport

Reported-by: Russell Currey <ruscur@russell.cc>
Reported-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Daniel Axtens <dja@axtens.net>
(cherry picked from commit 7a20ccda99e48dab643d1fbd7e170fe3e4c47185)
patchwork/api/check.py
patchwork/tests/api/test_check.py