Skip to content
Merged
Changes from 1 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
Prev Previous commit
Next Next commit
fix AttributeError
  • Loading branch information
zhangchunlin committed Jan 28, 2019
commit 4807dfd7d4e23e0933a0119ef68729e60d724a97
3 changes: 2 additions & 1 deletion uliweb_apijson/apijson/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ def _put_one(self,key,tag):
log.error("try to find model '%s' but not found: '%s'"%(modelname,e))
return json({"code":400,"msg":"model '%s' not found"%(modelname)})

request_tag = settings.APIJSON_REQUESTS.get(tag,{})
APIJSON_REQUESTS = settings.APIJSON_REQUESTS or {}
request_tag = APIJSON_REQUESTS.get(tag,{})
request_tag_tag = request_tag.get(tag,{})
if not request_tag_tag:
return json({"code":400,"msg":"tag '%s' not found"%(tag)})
Expand Down