yourlabs / django-autocomplete-light

A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
https://django-autocomplete-light.readthedocs.io
MIT License
1.79k stars 467 forks source link

use get_display_label() as id for new choices in BaseQuerySetView.post() #1300

Closed dparter closed 1 year ago

dparter commented 2 years ago

When a user adds a new value to choices as described at "Creation of new choices in the autocomplete form" the returned "id" is always result.pk

BaseQuerySetView.post() should set the id to self.get_result_value(result) for the case where the view is returning a different id.

jpic commented 1 year ago

Agreed, do you want to make a pull request?