Merge branch 'feature/document_importer' into nightly
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
+2
-1
@@ -12,6 +12,8 @@ Importer branch
|
|||||||
==================
|
==================
|
||||||
* Add support for disabling the random primary key
|
* Add support for disabling the random primary key
|
||||||
test mixin.
|
test mixin.
|
||||||
|
* Add a reusable task to upload documents.
|
||||||
|
* Add MVP of the importer app.
|
||||||
* Fix mailing profile log columns mappings.
|
* Fix mailing profile log columns mappings.
|
||||||
GitLab issue #626. Thanks to Jesaja Everling (@jeverling)
|
GitLab issue #626. Thanks to Jesaja Everling (@jeverling)
|
||||||
for the report.
|
for the report.
|
||||||
@@ -21,7 +23,6 @@ Importer branch
|
|||||||
* Increase the Django STMP username.
|
* Increase the Django STMP username.
|
||||||
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
||||||
for the report and the research.
|
for the report and the research.
|
||||||
>>>>>>> versions/minor
|
|
||||||
|
|
||||||
3.2.2 (2019-06-19)
|
3.2.2 (2019-06-19)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ Changes
|
|||||||
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
GitLab issue #625. Thanks to Jesaja Everling (@jeverling)
|
||||||
for the report and the research.
|
for the report and the research.
|
||||||
|
|
||||||
|
|
||||||
Removals
|
Removals
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@@ -107,12 +106,8 @@ Backward incompatible changes
|
|||||||
Bugs fixed or issues closed
|
Bugs fixed or issues closed
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
- :gitlab-issue:`615`
|
|
||||||
=======
|
|
||||||
- :gitlab-issue:`619` poplib.POP3_SSL and poplib.POP3 initialized with wrong kwarg
|
- :gitlab-issue:`619` poplib.POP3_SSL and poplib.POP3 initialized with wrong kwarg
|
||||||
- :gitlab-issue:`625` mayan.apps.mailer.mailers.DjangoSMTP uses "user", but django.core.mail.backends.smtp.EmailBackend expects "username"
|
- :gitlab-issue:`625` mayan.apps.mailer.mailers.DjangoSMTP uses "user", but django.core.mail.backends.smtp.EmailBackend expects "username"
|
||||||
- :gitlab-issue:`626` Mailing profile error log is empty, despite errors
|
- :gitlab-issue:`626` Mailing profile error log is empty, despite errors
|
||||||
>>>>>>> versions/minor
|
|
||||||
|
|
||||||
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/
|
.. _PyPI: https://pypi.python.org/pypi/mayan-edms/
|
||||||
|
|||||||
@@ -65,13 +65,20 @@ def task_upload_new_document(self, document_type_id, shared_uploaded_file_id, ex
|
|||||||
if extra_data:
|
if extra_data:
|
||||||
for pair in extra_data.get('metadata_pairs', []):
|
for pair in extra_data.get('metadata_pairs', []):
|
||||||
name = slugify(pair['name']).replace('-', '_')
|
name = slugify(pair['name']).replace('-', '_')
|
||||||
|
logger.debug(
|
||||||
|
'Metadata pair (label, name, value): %s, %s, %s',
|
||||||
|
pair['name'], name, pair['value']
|
||||||
|
)
|
||||||
|
|
||||||
metadata_type, created = MetadataType.objects.get_or_create(
|
metadata_type, created = MetadataType.objects.get_or_create(
|
||||||
label=pair['name'], defaults={'name': name}
|
label=pair['name'], defaults={'name': name}
|
||||||
)
|
)
|
||||||
if created:
|
if not new_document.document_type.metadata.filter(metadata_type=metadata_type).exists():
|
||||||
|
logger.debug('Metadata type created')
|
||||||
new_document.document_type.metadata.create(
|
new_document.document_type.metadata.create(
|
||||||
metadata_type=metadata_type, required=False
|
metadata_type=metadata_type, required=False
|
||||||
)
|
)
|
||||||
|
|
||||||
new_document.metadata.create(
|
new_document.metadata.create(
|
||||||
metadata_type=metadata_type, value=pair['value']
|
metadata_type=metadata_type, value=pair['value']
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user