Typo fixes

This commit is contained in:
Oliver Walters 2021-06-27 00:12:10 +10:00
parent ae1a1e139f
commit 8913b74f41

View File

@ -58,7 +58,7 @@ class InvenTreeModelSerializer(serializers.ModelSerializer):
for field_name, field in fields.fields.items():
if field.has_default():
if field.has_default() and field_name not in initials:
value = field.default
@ -87,7 +87,7 @@ class InvenTreeModelSerializer(serializers.ModelSerializer):
for field_name, field in fields.fields.items():
if field.has_default():
if field not in self._validated_data:
if field_name not in self._validated_data.keys():
value = field.default
@ -97,7 +97,6 @@ class InvenTreeModelSerializer(serializers.ModelSerializer):
self._validated_data[field_name] = value
return valid
def run_validation(self, data=empty):