diff --git a/compose/config/config.py b/compose/config/config.py index fb376b325..f3b8e42fd 100644 --- a/compose/config/config.py +++ b/compose/config/config.py @@ -1044,8 +1044,8 @@ def merge_logging(base, override): md.merge_scalar('driver') if md.get('driver') == base.get('driver') or base.get('driver') is None: md.merge_mapping('options', lambda m: m or {}) - else: - md['options'] = override.get('options') + elif override.get('options'): + md['options'] = override.get('options', {}) return dict(md) diff --git a/tests/unit/config/config_test.py b/tests/unit/config/config_test.py index 8861baa98..8a1e16f8a 100644 --- a/tests/unit/config/config_test.py +++ b/tests/unit/config/config_test.py @@ -1864,7 +1864,6 @@ class ConfigTest(unittest.TestCase): 'image': 'alpine:edge', 'logging': { 'driver': 'syslog', - 'options': None } }