douban/helpdesk

Frontend checkbox after check and uncheck will still remain as checked

dispensable opened this issue · 2 comments

  1. check the checkbox
  2. uncheck the checkbox
  3. submmit and the value is checked value

前端传过去的值是字符串 "false",后端在这里只要有值就是 True

if live_value is not None:
if v.get('type') == 'boolean':
live_value = True
params[k] = live_value

在这改一下就行

哈哈哈,这 if bool = true 给我看笑了