From 233aca842194384b17cb6200e867eaf9afcd2173 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 5 Sep 2017 03:18:35 -0400 Subject: [PATCH] =?UTF-8?q?Consolidate=20intial=20document=20created=20eve?= =?UTF-8?q?nt=20and=20the=20first=20document=20properties=20edited=20event?= =?UTF-8?q?s.=20Preserve=20the=20user=20that=20initially=20creates=20the?= =?UTF-8?q?=20document.=20GitLab=20issue=20#433.=20Thanks=20to=20Jesaja=20?= =?UTF-8?q?Everling=E2=80=82(@jeverling)=20for=20the=20report.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roberto Rosario --- HISTORY.rst | 5 +++++ docs/releases/2.7.2.rst | 4 ++++ mayan/apps/sources/models.py | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4f44480e22..45f298d46c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ - Fix new mailer creation view. GitLab issue #431. Thanks to Robert Schöftner (@robert.schoeftner) for the report and the solution. +- Consolidate intial document created event and the first + document properties edited events. Preserve the user that + initially creates the document. GitLab issue #433. Thanks + to Jesaja Everling (@jeverling) for the report. + 2.7.1 (2017-09-03) ================== diff --git a/docs/releases/2.7.2.rst b/docs/releases/2.7.2.rst index 88b6eb2cb1..4303e9ab21 100644 --- a/docs/releases/2.7.2.rst +++ b/docs/releases/2.7.2.rst @@ -10,6 +10,10 @@ What's new - Fix new mailer creation view. GitLab issue #431. Thanks to Robert Schöftner (@robert.schoeftner) for the report and the solution. +- Consolidate intial document created event and the first + document properties edited events. Preserve the user that + initially creates the document. GitLab issue #433. Thanks + to Jesaja Everling (@jeverling) for the report. Removals -------- diff --git a/mayan/apps/sources/models.py b/mayan/apps/sources/models.py index ccca3851ff..e2e1d1c533 100644 --- a/mayan/apps/sources/models.py +++ b/mayan/apps/sources/models.py @@ -80,7 +80,7 @@ class Source(models.Model): """ try: with transaction.atomic(): - document = Document.objects.create( + document = Document( description=description or '', document_type=document_type, label=label or file_object.name, language=language or setting_language.value @@ -96,7 +96,7 @@ class Source(models.Model): else: try: document_version = document.new_version( - file_object=file_object, _user=user + file_object=file_object, _user=user, ) if user: