visitor create bug

This commit is contained in:
曹前明 2022-07-11 16:27:54 +08:00
parent b4a5bb2373
commit 05e9d627b7
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class VisitorCreateSerializer(CustomModelSerializer):
def create(self, validated_data):
with transaction.atomic():
# 校验上传的证件照
if validated_data['photo']:
if validated_data.get('photo', None):
dhClient.request(**dhapis['person_img_upload'], file_path_rela=validated_data['photo'])
return super().create(validated_data)