mirror of
https://github.com/yweber/lodel2.git
synced 2026-06-13 22:20:47 +02:00
[#50] Added the management of "integer" AND "int" in EmField (in the get_field_class method)
This commit is contained in:
parent
ed48c64ab8
commit
d2d193e58f
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue