ignore m2m for coverage

This commit is contained in:
Matthias 2022-03-12 03:40:27 +01:00
parent b88a6ccdb5
commit d8fc56cf61
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -49,7 +49,7 @@ class InvenTreeGroupAdminForm(forms.ModelForm):
'users',
]
def __init__(self, *args, **kwargs):
def __init__(self, *args, **kwargs): # pragma: no cover
super().__init__(*args, **kwargs)
if self.instance.pk:
@ -65,12 +65,12 @@ class InvenTreeGroupAdminForm(forms.ModelForm):
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.
self.instance.user_set.set(self.cleaned_data['users'])
def save(self, *args, **kwargs):
def save(self, *args, **kwargs): # pragma: no cover
# Default save
instance = super().save()
# Save many-to-many data