if FIELDS is not defined, still raise id first

This commit is contained in:
Romain Bignon 2010-10-08 10:52:41 +02:00
commit bf81773e8b

View file

@ -93,8 +93,9 @@ class CapBaseObject(object):
"""
if self.FIELDS is None:
yield 'id', self.id
for key, value in iter_fields(self):
if key not in ('backend','FIELDS'):
if key not in ('id', 'backend','FIELDS'):
yield key, value
else:
yield 'id', self.id