Generic view cleanup

This commit is contained in:
jeremystretch
2021-12-14 11:28:13 -05:00
parent cb00eb6c30
commit 89359f27f5
6 changed files with 102 additions and 51 deletions

View File

@@ -353,7 +353,7 @@ class ContactAssignmentEditView(generic.ObjectEditView):
model_form = forms.ContactAssignmentForm
template_name = 'tenancy/contactassignment_edit.html'
def alter_obj(self, instance, request, args, kwargs):
def alter_object(self, instance, request, args, kwargs):
if not instance.pk:
# Assign the object based on URL kwargs
content_type = get_object_or_404(ContentType, pk=request.GET.get('content_type'))