forked from ScoDoc/DocScoDoc
convert ids to integers
This commit is contained in:
parent
9413573e58
commit
379b2591fd
@ -206,10 +206,11 @@ class TF(object):
|
||||
if self.values[field] == None:
|
||||
self.values[field] = ""
|
||||
|
||||
# convert numbers
|
||||
if type(self.values[field]) == type(1) or type(self.values[field]) == type(
|
||||
1.0
|
||||
):
|
||||
# convert numbers, except ids
|
||||
if field.endswith("id") and self.values[field]:
|
||||
# enforce integer ids:
|
||||
self.values[field] = int(self.values[field])
|
||||
elif isinstance(self.values[field], (int, float)):
|
||||
self.values[field] = str(self.values[field])
|
||||
#
|
||||
if "tf-checked" not in self.values:
|
||||
|
Loading…
Reference in New Issue
Block a user