diff --git a/EditorialModel/fields.py b/EditorialModel/fields.py index e83da5d..1f469df 100644 --- a/EditorialModel/fields.py +++ b/EditorialModel/fields.py @@ -57,7 +57,11 @@ class EmField(EmComponent): # @throw When not found # @see EmField::fieldtypes() def get_field_class(ftype, **kwargs): - ftype_module = importlib.import_module('EditorialModel.fieldtypes.%s'%ftype) + if ftype == 'integer': + ftype_module = importlib.import_module('EditorialModel.fieldtypes.int') + else: + ftype_module = importlib.import_module('EditorialModel.fieldtypes.%s'%ftype) + return ftype_module.fclass @staticmethod diff --git a/EditorialModel/fieldtypes/int.py b/EditorialModel/fieldtypes/int.py index f664334..efb2a3b 100644 --- a/EditorialModel/fieldtypes/int.py +++ b/EditorialModel/fieldtypes/int.py @@ -10,6 +10,6 @@ class EmFieldInt(EmField): help = 'Basic integer field' def __init__(self, **kwargs): - super(EmFieldChar, self).__init__(**kwargs) + super(EmFieldInt, self).__init__(**kwargs) fclass=EmFieldInt