File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -849,7 +849,8 @@ class ConcertAdmin(ModelAdmin):
849849 'class="related-widget-wrapper" data-model-ref="band"><select '
850850 'name="main_band" data-context="available-source" required '
851851 'id="id_main_band" data-custom-widget="true" multiple>'
852- '<option value="">---------</option><option value="1">The Doors</option>'
852+ '<option value="">---------</option>'
853+ f'<option value="{ self .band .pk } ">The Doors</option>'
853854 "</select></div></div>"
854855 )
855856 self .assertInHTML (expected , cmafa ().render ())
@@ -873,9 +874,10 @@ class ConcertAdmin(ModelAdmin):
873874 expected = (
874875 '<fieldset><legend>Main band:</legend><div class="related-widget-wrapper" '
875876 'data-model-ref="band"><div id="id_main_band"><div><label '
876- 'for="id_main_band_0"><input type="radio" name="main_band" value="1" '
877- 'data-context="available-source" required id="id_main_band_0" '
878- 'use_fieldset="true">The Doors</label></div></div></div></fieldset>'
877+ 'for="id_main_band_0"><input type="radio" name="main_band" '
878+ f'value="{ self .band .pk } " data-context="available-source" '
879+ 'required id="id_main_band_0" use_fieldset="true">The Doors</label>'
880+ "</div></div></div></fieldset>"
879881 )
880882 self .assertInHTML (expected , cmafa ().render ())
881883
You can’t perform that action at this time.
0 commit comments