Ensure that the automatic index is created after the default document type is created.
This commit is contained in:
@@ -17,7 +17,7 @@ from common import (
|
||||
from common.classes import Package
|
||||
from common.signals import post_initial_setup
|
||||
from common.widgets import two_state_template
|
||||
from documents.signals import post_document_created
|
||||
from documents.signals import post_document_created, post_initial_document_type
|
||||
from mayan.celery import app
|
||||
from navigation import SourceColumn
|
||||
from rest_api.classes import APIEndPoint
|
||||
@@ -56,6 +56,10 @@ class DocumentIndexingApp(MayanAppConfig):
|
||||
app_label='documents', model_name='Document'
|
||||
)
|
||||
|
||||
DocumentType = apps.get_model(
|
||||
app_label='documents', model_name='DocumentType'
|
||||
)
|
||||
|
||||
DocumentMetadata = apps.get_model(
|
||||
app_label='metadata', model_name='DocumentMetadata'
|
||||
)
|
||||
@@ -234,9 +238,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
document_created_index_update,
|
||||
dispatch_uid='document_created_index_update', sender=Document
|
||||
)
|
||||
post_initial_setup.connect(
|
||||
post_initial_document_type.connect(
|
||||
create_default_document_index,
|
||||
dispatch_uid='create_default_document_index'
|
||||
dispatch_uid='create_default_document_index', sender=DocumentType
|
||||
)
|
||||
post_save.connect(
|
||||
document_metadata_index_update,
|
||||
|
||||
Reference in New Issue
Block a user