Autocomplete fields and cleaned_data

40 views
Skip to first unread message

Melvyn Sopacua | 3YOURMIND

unread,
May 13, 2019, 2:25:56 PM5/13/19
to django-d...@googlegroups.com
I'm currently looking at a bug in our application, caused by autocomplete_fields on a ModelAdmin. It seemingly removes the field from self.cleaned_data, which means we can no longer validate it.

I can reproduce this by removing/adding the field from/to autocomplete_fields and resubmitting the form after re-rendering. This is a vanilla manytomany relation.

So now I wonder if this is an implementation bug in Django, with us (something else I'm not considering) or documentation bug, as none of this is mentioned in the documentation on either concepts.

I'm happy to file a bug report and classify it according to the above if it is a bug. Otherwise, I'll dive down the rabbit hole.
--

The information that has been provided should be regarded as confidential within the context of our non-disclosure agreement.

 

3YOURMIND GmbH

Bismarckstraße 10-12 | 10625 Berlin | Germany

VAT ID - USt-IdNr. gemäß § 27 a Umsatzsteuergesetz: DE296555110

Company with its registered seat in - Sitz der Gesellschaft: Berlin

Register court - Registergericht: Amtsgericht Charlottenburg (Berlin)

Florian Apolloner

unread,
May 13, 2019, 2:56:17 PM5/13/19
to Django developers (Contributions to Django itself)


On Monday, May 13, 2019 at 8:25:56 PM UTC+2, Melvyn Sopacua | 3YOURMIND wrote:
It seemingly removes the field from self.cleaned_data, which means we can no longer validate it.

If that is the case it is a bug I'd say.
Reply all
Reply to author
Forward
0 new messages