dont overwrite default itemkey properties
This commit is contained in:
parent
2802b6b691
commit
c2dfb6f2e4
1 changed files with 2 additions and 1 deletions
|
@ -1406,7 +1406,8 @@ for key in filter(lambda k: k.get('sort', False) or k['type'] in ('integer', 'ti
|
||||||
'time': 'integer',
|
'time': 'integer',
|
||||||
'enum': 'integer',
|
'enum': 'integer',
|
||||||
}.get(sort_type, sort_type)]
|
}.get(sort_type, sort_type)]
|
||||||
attrs[name] = model[0](**model[1])
|
if name not in attrs:
|
||||||
|
attrs[name] = model[0](**model[1])
|
||||||
|
|
||||||
ItemSort = type('ItemSort', (models.Model,), attrs)
|
ItemSort = type('ItemSort', (models.Model,), attrs)
|
||||||
ItemSort.fields = [f.name for f in ItemSort._meta.fields]
|
ItemSort.fields = [f.name for f in ItemSort._meta.fields]
|
||||||
|
|
Loading…
Reference in a new issue