1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Enable many-to-many model assignment for ObjectPermissions

This commit is contained in:
Jeremy Stretch
2020-05-28 15:04:46 -04:00
parent bdfc0364d5
commit f65b2278f0
6 changed files with 122 additions and 94 deletions

View File

@ -89,8 +89,8 @@ class ObjectPermissionForm(forms.ModelForm):
super().__init__(*args, **kwargs)
# Format ContentType choices
order_content_types(self.fields['model'])
self.fields['model'].choices.insert(0, ('', '---------'))
order_content_types(self.fields['content_types'])
self.fields['content_types'].choices.insert(0, ('', '---------'))
@admin.register(ObjectPermission)