Closed chellman closed 5 months ago
What Python and Django version do you use? This is pretty intensively tested so I'm wondering how that could come up now.
Nevermind, I see an issue as well.
v4.2 https://pypi.org/project/django-dynamic-raw-id/ has been released with your fix. Thank you for the report, investigation and provided fix.
While the widget itself is tested, its actually never checked that data is retained correctly after the save of the admin change form itself.
I'll use a little bit of German I know. Vielen dank, Martin! I really appreciate you taking the time on this.
I'm glad to see the compatibility update, but I think something was removed that shouldn't have been.
dynamic_raw_id.widgets.DynamicRawIDMultiIdWidget.value_from_datadict
doesn't exist anymore, and when I save a model withdynamic_raw_id_fields = (my_field)
, values like this:33,22,11
Get transformed to this:
3,3,,2,2,,1,1
Causing an invalid list error with "Enter a list of values." displayed.
Poking around in the code, I found that restoring the missing function above, removed here, restores the expected behavior.
(Edit - PR is up.)