forked from ScoDoc/ScoDoc
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:
|
if self.values[field] == None:
|
||||||
self.values[field] = ""
|
self.values[field] = ""
|
||||||
|
|
||||||
# convert numbers
|
# convert numbers, except ids
|
||||||
if type(self.values[field]) == type(1) or type(self.values[field]) == type(
|
if field.endswith("id") and self.values[field]:
|
||||||
1.0
|
# enforce integer ids:
|
||||||
):
|
self.values[field] = int(self.values[field])
|
||||||
|
elif isinstance(self.values[field], (int, float)):
|
||||||
self.values[field] = str(self.values[field])
|
self.values[field] = str(self.values[field])
|
||||||
#
|
#
|
||||||
if "tf-checked" not in self.values:
|
if "tf-checked" not in self.values:
|
||||||
|
Loading…
Reference in New Issue
Block a user