mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
ignore m2m for coverage
This commit is contained in:
parent
b88a6ccdb5
commit
d8fc56cf61
@ -49,7 +49,7 @@ class InvenTreeGroupAdminForm(forms.ModelForm):
|
|||||||
'users',
|
'users',
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs): # pragma: no cover
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
if self.instance.pk:
|
if self.instance.pk:
|
||||||
@ -65,12 +65,12 @@ class InvenTreeGroupAdminForm(forms.ModelForm):
|
|||||||
help_text=_('Select which users are assigned to this group')
|
help_text=_('Select which users are assigned to this group')
|
||||||
)
|
)
|
||||||
|
|
||||||
def save_m2m(self):
|
def save_m2m(self): # pragma: no cover
|
||||||
# Add the users to the Group.
|
# Add the users to the Group.
|
||||||
|
|
||||||
self.instance.user_set.set(self.cleaned_data['users'])
|
self.instance.user_set.set(self.cleaned_data['users'])
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs): # pragma: no cover
|
||||||
# Default save
|
# Default save
|
||||||
instance = super().save()
|
instance = super().save()
|
||||||
# Save many-to-many data
|
# Save many-to-many data
|
||||||
|
Loading…
Reference in New Issue
Block a user