commit | 6c78e128ada7f0e39821e2fbc90be25b2eb1e4cb | [log] [tgz] |
---|---|---|
author | Matteo Scandolo <matteo.scandolo@gmail.com> | Thu Jan 12 17:02:37 2017 -0800 |
committer | Matteo Scandolo <matteo.scandolo@gmail.com> | Thu Jan 12 17:02:37 2017 -0800 |
tree | f7e5c7fd808af588fa4749707d4d1b52569116e8 | |
parent | edb2c4f88a88bc6e69090182c087d8df173563f2 [diff] |
Added default field type to modeldefs api Change-Id: Idbd04532ea6b9e5f384d63fe6f77d6fbfeca8941
diff --git a/xos/api/utility/modeldefs.py b/xos/api/utility/modeldefs.py index c3b5e21..a80d677 100644 --- a/xos/api/utility/modeldefs.py +++ b/xos/api/utility/modeldefs.py
@@ -84,6 +84,8 @@ fieldtype = self.convertType(f.get_internal_type()) if fieldtype is not None: field['type'] = fieldtype + else: + field['type'] = 'string' if not f.blank and not f.null: field['validators']['required'] = True