Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
930 B
2
Indexable
Never
instance.save()
                if form.cleaned_data['signature_file']:
                    instance.signature_file.save(form.cleaned_data['signature_file'].name, form.cleaned_data['signature_file'])
                instance.linkedin_profile = form.cleaned_data['linkedin_profile']
                instance.teaching_mode = form.cleaned_data['teaching_mode']
                instance.save()
                if form.cleaned_data['photo_file']:
                    photo_file = form.cleaned_data['photo_file']
                    photo_instance = ApplicationDocument.objects.filter(application=instance, document_id=38).first()

                    if photo_instance:
                        photo_instance.file.save(photo_file.name, photo_file)
                    else:
                        photo_instance = ApplicationDocument.objects.create(
						    application=instance,
						    document_id=38,
						    file=photo_file)
Leave a Comment