Add check for app references

Point users to release notes for details when app references are not updated.
GitLab issue #603. Thanks to Vikas Kedia (@vikaskedia) for the report.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-06-14 02:16:37 -04:00
parent 7650ef17c0
commit 727fe78d8b
3 changed files with 16 additions and 0 deletions

View File

@@ -7,6 +7,8 @@
* Use YAML SafeDumper to avoid adding YAML datatype tags.
Closes GitLab issue #599. Thanks to Frédéric Sheedy
(@fsheedy) for the report and debug information.
* Add check for app references and point users to release notes for details.
GitLab issue #603. Thanks to Vikas Kedia (@vikaskedia) for the report.
3.2 (2019-06-13)
================

View File

@@ -15,6 +15,8 @@ Changes
- Use YAML SafeDumper to avoid adding YAML datatype tags.
Closes GitLab issue #599. Thanks to Frédéric Sheedy
(@fsheedy) for the report and debug information.
- Add check for app references and point users to release notes for details.
GitLab issue #603. Thanks to Vikas Kedia (@vikaskedia) for the report.
Removals

View File

@@ -14,6 +14,7 @@ from __future__ import unicode_literals
import os
import sys
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _
import environ
@@ -355,6 +356,9 @@ else:
}
}
BASE_INSTALLED_APPS = INSTALLED_APPS
CONFIGURATION_FILEPATH = os.path.join(MEDIA_ROOT, CONFIGURATION_FILENAME)
CONFIGURATION_LAST_GOOD_FILEPATH = os.path.join(
MEDIA_ROOT, CONFIGURATION_LAST_GOOD_FILENAME
@@ -364,3 +368,11 @@ if 'revertsettings' not in sys.argv:
result = read_configuration_file(CONFIGURATION_FILEPATH)
if result:
globals().update(result)
for app in INSTALLED_APPS:
if 'mayan.apps.{}'.format(app) in BASE_INSTALLED_APPS:
raise ImproperlyConfigured(
'Update the app references in the file config.yml as detailed '
'in https://docs.mayan-edms.com/releases/3.2.html#backward-incompatible-changes'
)