Closed jrief closed 4 months ago
sorry, unfortunately clean_data['owner']
might not be set. Just found out while testing locally. owner
isn't used anyway in validate_upload(…)
so using cleaned_data.get("owner")
is safer.
Where's cleaned_data["owner"]
used and how does that affect the PR? Maybe that's another PR?
Description
Method
clean_subject_location
not implemented correctly.According to the Django docs and to my own experience, a method for cleaning a specific field attribute should not itself call
super().clean()
. This is because this method is invoked later anyway. In the current implementation the methodFileAdminChangeFrom.clean()
is called twice, which in my opinion should not happen.It also sometimes causes problems if users try to replace an image using the Filer's admin image detail view.
Since no functionality changed, I did not add any extra test.
Checklist
master