visitor create bug
This commit is contained in:
parent
b4a5bb2373
commit
05e9d627b7
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue