From 9da450f8a77297067dd7d20940e875b466387823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Tue, 29 Aug 2023 16:32:37 +0800 Subject: [PATCH] feat: + safe code --- metagpt/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metagpt/config.py b/metagpt/config.py index 4cae79b17..5944fef57 100644 --- a/metagpt/config.py +++ b/metagpt/config.py @@ -131,6 +131,8 @@ class Config(metaclass=Singleton): def set_context(self, options: dict): """Update current config""" + if not options: + return opts = deepcopy(OPTIONS.get()) opts.update(options) OPTIONS.set(opts)