1
0
forked from ScoDoc/ScoDoc

convert ids to integers

This commit is contained in:
Emmanuel Viennet 2021-08-09 10:25:45 +02:00
parent 9413573e58
commit 379b2591fd

View File

@ -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: