Get default value for inherited field only if there is a default method for issue2027
This commit is contained in:
1 parent
6a828d81ad
commit
175fb9cd0f
1 file changed
+3
-2
@@ -253,8 +253,9 @@ class ModelSQL(ModelStorage):
|
||||
'write_uid', 'write_date'):
|
||||
default.append(i)
|
||||
for i in self._inherit_fields.keys():
|
||||
if (not i in values) \
|
||||
and (not self._inherit_fields[i][0] in avoid_table):
|
||||
if ((not i in values)
|
||||
and (not self._inherit_fields[i][0] in avoid_table)
|
||||
and i in self._defaults):
|
||||
default.append(i)
|
||||
|
||||
if len(default):
|
||||
|
||||
Reference in new issue
Block a user