Simplify and remove old code

This commit is contained in:
Roberto Rosario
2015-04-07 16:04:09 -04:00
parent 69a7efd6f0
commit 9084c3c651
9 changed files with 145 additions and 158 deletions
+2 -2
View File
@@ -48,10 +48,10 @@ class SetupSmartLinkDocumentTypesView(AssignRemoveView):
return super(SetupSmartLinkDocumentTypesView, self).dispatch(request, *args, **kwargs)
def left_list(self):
return generate_choices_w_labels(DocumentType.objects.exclude(pk__in=self.smart_link.document_types.all()), display_object_type=False)
return generate_choices_w_labels(DocumentType.objects.exclude(pk__in=self.smart_link.document_types.all()))
def right_list(self):
return generate_choices_w_labels(self.smart_link.document_types.all(), display_object_type=False)
return generate_choices_w_labels(self.smart_link.document_types.all())
def remove(self, item):
self.smart_link.document_types.remove(item)