Skip to content

Commit

Permalink
fix download
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Jul 8, 2023
1 parent 5ceaf94 commit 668cfb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ def from_dict(self, data: dict):
从字典中初始化
"""
for key, value in data.items():
setattr(self, key, value)
attr = getattr(self, key, None)
if attr and not isinstance(attr, property):
setattr(self, key, value)
if isinstance(self.type, str):
self.type = MediaType(self.type)

Expand Down

0 comments on commit 668cfb7

Please sign in to comment.