From f58d2b9ce7e425b5a9df769c363af57169693626 Mon Sep 17 00:00:00 2001 From: Mark Hall <mark.hall@work.room3b.eu> Date: Tue, 10 Dec 2019 13:01:50 +0000 Subject: [PATCH] Update changes loading --- digital_edition_editor/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/digital_edition_editor/settings.py b/digital_edition_editor/settings.py index 68f253b..8300616 100644 --- a/digital_edition_editor/settings.py +++ b/digital_edition_editor/settings.py @@ -148,7 +148,7 @@ with open('CHANGES.md') as in_f: if match is None: match = re.match('## (Development) \(()\)', line.strip()) if match and last_version != match.group(1): - if len(changes) > 0: + if len(changes) > 0 and (DEBUG or last_version != 'Development'): HISTORY.append((last_version, last_date, tuple(changes))) changes = [] last_version = match.group(1) @@ -157,7 +157,7 @@ with open('CHANGES.md') as in_f: match = re.match('\\* \\*\\*([a-zA-Z]+)\*\*:\s+((?:\w|\s|[-,.:;"\'])+)', line.strip()) if match: changes.append((match.group(1).lower(), _icon_mappings[match.group(1).lower()], match.group(2))) - if last_version and len(changes) > 0: + if last_version and len(changes) > 0 and (DEBUG or last_version != 'Development'): HISTORY.append((last_version, last_date, tuple(changes))) HISTORY = tuple(HISTORY) if HISTORY: -- GitLab