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:
@@ -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)
|
||||
================
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user