filter fields available to inherit in space settings
This commit is contained in:
parent
a20a877dc7
commit
b0705da1fe
@ -523,6 +523,10 @@ class SpacePreferenceForm(forms.ModelForm):
|
|||||||
reset_food_inherit = forms.BooleanField(label=_("Reset Food Inheritance"), initial=False, required=False,
|
reset_food_inherit = forms.BooleanField(label=_("Reset Food Inheritance"), initial=False, required=False,
|
||||||
help_text=_("Reset all food to inherit the fields configured."))
|
help_text=_("Reset all food to inherit the fields configured."))
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs) # populates the post
|
||||||
|
self.fields['food_inherit'].queryset = Food.inherit_fields
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Space
|
model = Space
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user