Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
show the file url in email notifications instead of file name
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Yunenko committed Sep 15, 2020
1 parent 4c1266e commit ed766a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aldryn_forms/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from .forms import TextAreaFieldForm
from .forms import TextFieldForm
from .helpers import get_user_name
from .models import FileUploadFieldPlugin
from .models import SerializedFormField
from .signals import form_post_save
from .signals import form_pre_save
Expand Down Expand Up @@ -298,7 +299,7 @@ def serialize_field(self, form, field, is_confirmation=False):
value = self.serialize_value(
instance=field.plugin_instance,
value=form.cleaned_data[field.name],
is_confirmation=is_confirmation
is_confirmation=is_confirmation,
)
serialized_field = SerializedFormField(
name=field.name,
Expand Down Expand Up @@ -608,8 +609,7 @@ def get_form_field_kwargs(self, instance):

def serialize_value(self, instance, value, is_confirmation=False):
if value:
return (value.original_filename if is_confirmation
else value.absolute_uri)
return value.absolute_uri
else:
return '-'

Expand Down

0 comments on commit ed766a9

Please sign in to comment.