Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sync#26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
TommyLemon merged 9 commits intoAPIJSON:masterfromzhangchunlin:master
May 10, 2019
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
fix DISALLOW and NECESSARY get wrongly problem
  • Loading branch information
@zhangchunlin
zhangchunlin committedApr 30, 2019
commitd1ff139dfa17fe8be449befac4384318530bf21c
12 changes: 6 additions & 6 deletionsuliweb_apijson/apijson/views.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,9 +380,9 @@ def _post_one(self,key,tag):
params_role = ADD_role

permission_check_ok = False
POST = model_setting.get("POST")
ifPOST:
roles =POST.get("roles")
model_POST = model_setting.get("POST")
ifmodel_POST:
roles =model_POST.get("roles")
if params_role:
if not params_role in roles:
return json({"code":400,"msg":"'%s' not accessible by role '%s'"%(modelname,params_role)})
Expand All@@ -409,17 +409,17 @@ def _post_one(self,key,tag):
if not permission_check_ok:
return json({"code":400,"msg":"no permission"})

DISALLOW =POST.get("DISALLOW")
DISALLOW =tag_POST.get("DISALLOW")
if DISALLOW:
for field in DISALLOW:
if field in params:
log.error("request '%s' disallow '%s'"%(tag,field))
return json({"code":400,"msg":"request '%s' disallow '%s'"%(tag,field)})

NECESSARY =POST.get("NECESSARY")
NECESSARY =tag_POST.get("NECESSARY")
if NECESSARY:
for field in NECESSARY:
if field not in params:
if field not in params or params.get(field)==None:
log.error("request '%s' don't have necessary field '%s'"%(tag,field))
return json({"code":400,"msg":"request '%s' don't have necessary field '%s'"%(tag,field)})

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp