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