diff options
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/forms.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/tests.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index e3cdfeb4e..5cc544171 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1673,7 +1673,7 @@ class DocumentGenerationAdminActForm(IshtarForm): self.obj = kwargs.pop('obj') super(DocumentGenerationAdminActForm, self).__init__(*args, **kwargs) self.fields['document_template'].choices = DocumentTemplate.get_tuples( - dct={'associated_object_name': + dct={'associated_model__klass': 'archaeological_operations.models.AdministrativeAct', 'acttypes__intented_to': self.document_type}) diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 8eb2f361a..eba0d296a 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -2159,9 +2159,12 @@ class RegisterTest(TestCase, OperationInitTest): '../archaeological_operations/tests/document_reference.odt', 'rb') template = SimpleUploadedFile(tpl.name, tpl.read()) + model, __ = ImporterModel.objects.get_or_create( + klass='archaeological_operations.models.AdministrativeAct' + ) doc = DocumentTemplate.objects.create( name="Test", - associated_object_name=DocumentTemplate.CLASSNAMES[0][0], + associated_model=model, available=True, template=template ) |
