mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
feat(db): update model to support JSON
This commit is contained in:
@@ -160,8 +160,6 @@ class Base:
|
||||
def update(self, db: Session, payload: dict):
|
||||
payload = {k: v for k, v in payload.items() if v is not None}
|
||||
for key, value in payload.items():
|
||||
if ObjectUtils.is_obj(value):
|
||||
value = json.dumps(value)
|
||||
setattr(self, key, value)
|
||||
if inspect(self).detached:
|
||||
db.add(self)
|
||||
|
||||
Reference in New Issue
Block a user