Skip to content

Commit 2c84647

Browse files
committed
fix NameError
1 parent 26bdea4 commit 2c84647

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

uliweb_apijson/apijson/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ moment = {
5454
settings.APIJSON_REQUESTS.[TAG_NAME]
5555

5656
request types currently support: POST, PUT
57+
5758
request configuration currently support: ADD,DISALLOW,NECESSARY (still not fully support [all the configuration items](https://github.com/TommyLemon/APIJSON/wiki#%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86))
5859

5960

uliweb_apijson/apijson/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ def _post_one(self,key,tag):
365365
if not permission_check_ok:
366366
return json({"code":400,"msg":"no permission"})
367367

368-
DISALLOW = request_setting_POST.get("DISALLOW")
368+
DISALLOW = POST.get("DISALLOW")
369369
if DISALLOW:
370370
for field in DISALLOW:
371371
if field in params:
372372
log.error("request '%s' disallow '%s'"%(tag,field))
373373
return json({"code":400,"msg":"request '%s' disallow '%s'"%(tag,field)})
374374

375-
NECESSARY = request_setting_POST.get("NECESSARY")
375+
NECESSARY = POST.get("NECESSARY")
376376
if NECESSARY:
377377
for field in NECESSARY:
378378
if field not in params:

0 commit comments

Comments
 (0)