Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -194,6 +194,7 @@ async def sms_posts(instance: ResultItem, idx: str = None, action: str = "add")
|
|
| 194 |
await session.commit()
|
| 195 |
else: # update
|
| 196 |
vars(existing).update(vars(instance))
|
|
|
|
| 197 |
await session.commit()
|
| 198 |
await session.refresh(existing)
|
| 199 |
result = existing
|
|
|
|
| 194 |
await session.commit()
|
| 195 |
else: # update
|
| 196 |
vars(existing).update(vars(instance))
|
| 197 |
+
session.add(existing) # Not asynchronous
|
| 198 |
await session.commit()
|
| 199 |
await session.refresh(existing)
|
| 200 |
result = existing
|