jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.12k stars 352 forks source link

No value displayed in dependent field on "Add" row in Admin Inline #276

Closed nameisnot closed 4 years ago

nameisnot commented 6 years ago

You MUST use this template when reporting issues. Please make sure you follow the checklist and fill in all of the information sections below.


All versions of django-smart-selects prior to version 1.2.8 are vulnerable to an XSS attack as detailed in issue 171. As a result, all previous versions have been removed from PyPI to prevent users from installing insecure versions. All users are urged to upgrade as soon as possible.

Checklist

Put an x in the bracket when you have completed each task, like this: [x]

Steps to reproduce

  1. Tried using Admin TabularInline on my models using smart-selects
  2. The default number of rows kept at 1 ("extra = 1")
  3. The inline is working normally (with the filled / selected dependent field value) and also is able to save data as expected.

Actual behavior

  1. Adding a new row fails to show the dependent field value on selection as experienced in the first row (correctly and as expected).
  2. If the value of "extra" is changed (say, to 2 or 3 or such) all the rows produced in the inline demonstrates the smart-selects behavior correctly. While adding a new row fails.

Expected behavior

  1. The dependent field should show the value corresponding to the chained field value selected (as normally expected and demonstrated)

Using:

  1. Python: 3.6
  2. Django: 2.0.6
  3. smart-selects: 1.5.4
  4. js-unlinting-fixes installed

P.S. Found a similar issue on Git but that was about django-ajax-selects.

manelclos commented 4 years ago

@nameisnot can you reproduce with latest master version?

manelclos commented 4 years ago

Closing due to inactivity