Skip to content

Commit

Permalink
method clean_subject_location not implemented correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed May 17, 2024
1 parent 0402d66 commit d13e7ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion filer/admin/fileadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def clean(self):
validate_upload(
file_name=cleaned_data["file"].name,
file=file.file,
owner=cleaned_data["owner"],
owner=cleaned_data.get("owner"),
mime_type=mime_type,
)
file.open("r")
Expand Down
5 changes: 2 additions & 3 deletions filer/admin/imageadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ def clean_subject_location(self):
for subject location widget to receive valid coordinates on field
validation errors.
"""
cleaned_data = super().clean()
subject_location = cleaned_data['subject_location']
subject_location = self.cleaned_data['subject_location']
if not subject_location:
# if supplied subject location is empty, do not check it
return subject_location
Expand All @@ -69,7 +68,7 @@ def clean_subject_location(self):
else:
return subject_location

self._set_previous_subject_location(cleaned_data)
self._set_previous_subject_location(self.cleaned_data)
raise forms.ValidationError(
string_concat(
err_msg,
Expand Down

0 comments on commit d13e7ba

Please sign in to comment.