Browse Source

Coorecting dats_base

prieto 8 years ago
parent
commit
4acb7832ff
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      lodel/leapi/datahandlers/datas_base.py

+ 5
- 0
lodel/leapi/datahandlers/datas_base.py View File

@@ -64,6 +64,11 @@ class Varchar(DataField):
64 64
     
65 65
     def _check_data_value(self, value):
66 66
         error = None
67
+        try:
68
+            value = str(value)
69
+        except(ValueError, TypeError):
70
+            error = TypeError("The value '%s' can't be a str" % value)
71
+        return value, error
67 72
         return value, error
68 73
 
69 74
 ##@brief Data field designed to handle date & time 

Loading…
Cancel
Save