Commit 36b7fe91 by Kálmán Viktor

dashboard: fix req traits not cleaning properly without perms

parent 0e7d8bb6
...@@ -544,6 +544,9 @@ class TemplateForm(forms.ModelForm): ...@@ -544,6 +544,9 @@ class TemplateForm(forms.ModelForm):
else: else:
self.cleaned_data[name] = getattr(old, name) self.cleaned_data[name] = getattr(old, name)
if "req_traits" not in self.allowed_fields:
self.cleaned_data['req_traits'] = self.instance.req_traits.all()
def save(self, commit=True): def save(self, commit=True):
data = self.cleaned_data data = self.cleaned_data
self.instance.max_ram_size = data.get('ram_size') self.instance.max_ram_size = data.get('ram_size')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment