Skip to content

Commit a2bc8d3

Browse files
committed
Store default of "None" as empty string for integer configuration items
1 parent 8f95d8e commit a2bc8d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

quicktill/config.py

+4
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ def from_db(cls, s):
160160

161161
@classmethod
162162
def to_db(cls, v):
163+
if v is None:
164+
return ""
163165
return str(v)
164166

165167

@@ -181,6 +183,8 @@ def from_db(cls, s):
181183

182184
@classmethod
183185
def to_db(cls, v):
186+
if v is None:
187+
return ""
184188
return str(v)
185189

186190

0 commit comments

Comments
 (0)