1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Merge pull request #779 from adam111316/checkbox_fix

Fix #3 for daily/backlog checkbox saving
This commit is contained in:
adam111316 2014-09-05 22:03:28 +08:00
commit 495a9e15d9

View File

@ -250,6 +250,10 @@ def checkbox_to_value(option, value_on=1, value_off=0):
Turns checkbox option 'on' or 'true' to value_on (1)
any other value returns value_off (0)
"""
if type(option) is list:
option = option[-1]
if option == 'on' or option == 'true':
return value_on