Only create the initial document type and web source if none exists.
This commit is contained in:
@@ -6,4 +6,5 @@ from .models import DocumentType
|
|||||||
|
|
||||||
|
|
||||||
def create_default_document_type(sender, **kwargs):
|
def create_default_document_type(sender, **kwargs):
|
||||||
|
if not DocumentType.objects.count():
|
||||||
DocumentType.objects.create(label=_('Default'))
|
DocumentType.objects.create(label=_('Default'))
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from .models import POP3Email, IMAPEmail, WatchFolderSource, WebFormSource
|
|||||||
|
|
||||||
|
|
||||||
def create_default_document_source(sender, **kwargs):
|
def create_default_document_source(sender, **kwargs):
|
||||||
|
if not WebFormSource.objects.count():
|
||||||
WebFormSource.objects.create(
|
WebFormSource.objects.create(
|
||||||
label=_('Default'), uncompress=SOURCE_UNCOMPRESS_CHOICE_ASK
|
label=_('Default'), uncompress=SOURCE_UNCOMPRESS_CHOICE_ASK
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user