Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -177,7 +177,7 @@ async def sms_posts(instance: ResultItem, idx: str = None, action: str = "add")
|
|
177 |
async with AsyncSession(sms_resource["engine"]) as session:
|
178 |
code = 1
|
179 |
error = None
|
180 |
-
result = instance.model_copy()
|
181 |
existing = await session.get(instance.__class__, idx)
|
182 |
|
183 |
# For add action, do db operation if instance is not existing. Other actions, do db operation if instance exists in db
|
|
|
177 |
async with AsyncSession(sms_resource["engine"]) as session:
|
178 |
code = 1
|
179 |
error = None
|
180 |
+
result = instance.model_copy(deep=True)
|
181 |
existing = await session.get(instance.__class__, idx)
|
182 |
|
183 |
# For add action, do db operation if instance is not existing. Other actions, do db operation if instance exists in db
|