Sistema limpio
This commit is contained in:
16
backend/fix_response.py
Normal file
16
backend/fix_response.py
Normal file
@@ -0,0 +1,16 @@
|
||||
with open("/app/app/api/v1/endpoints/auth.py", "r") as f:
|
||||
lines = f.readlines()
|
||||
|
||||
# Linea 286 (0-indexed 285): "tenant_id": str(user.tenant_id),
|
||||
# Agregar tenant_slug despues de tenant_id
|
||||
for i, line in enumerate(lines):
|
||||
if '"tenant_id": str(user.tenant_id),' in line:
|
||||
indent = " "
|
||||
new_line = indent + '"tenant_slug": tenant.slug if tenant else str(user.tenant_id),\n'
|
||||
lines.insert(i + 1, new_line)
|
||||
print(f"OK: tenant_slug agregado en linea {i+2}")
|
||||
break
|
||||
|
||||
with open("/app/app/api/v1/endpoints/auth.py", "w") as f:
|
||||
f.writelines(lines)
|
||||
print("Listo")
|
||||
Reference in New Issue
Block a user