fix scene base 'of_mode' error (#881)

Co-authored-by: jcfwwangxun_qm <jcfwwangxun_qm@faw.com.cn>
This commit is contained in:
曲奇饼
2023-12-02 10:07:48 +08:00
committed by GitHub
parent a35b612ac5
commit 13fb9d03a7

View File

@@ -109,7 +109,7 @@ class ChatScene(Enum):
@staticmethod
def of_mode(mode):
return [x for x in ChatScene._value_ if x.code == mode][0]
return [x for x in ChatScene if mode == x.value()][0]
@staticmethod
def is_valid_mode(mode):