usuarios en cliente
This commit is contained in:
14
fix_delete2.py
Normal file
14
fix_delete2.py
Normal file
@@ -0,0 +1,14 @@
|
||||
with open("/app/app/api/v1/endpoints/users.py", "r") as f:
|
||||
content = f.read()
|
||||
|
||||
old = " # Soft delete\n db_user.is_active = False\n await db.commit()"
|
||||
new = " # Hard delete\n await db.delete(db_user)\n await db.commit()"
|
||||
|
||||
if old in content:
|
||||
content = content.replace(old, new)
|
||||
print("OK: hard delete aplicado")
|
||||
else:
|
||||
print("ERROR: bloque no encontrado")
|
||||
|
||||
with open("/app/app/api/v1/endpoints/users.py", "w") as f:
|
||||
f.write(content)
|
||||
Reference in New Issue
Block a user