Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method clean_subject_location not implemented correctly #1465

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading