Sistema limpio

This commit is contained in:
2026-03-10 13:46:30 -06:00
parent 6bc5145b9c
commit 3f7b166767
21 changed files with 687 additions and 117 deletions

18
fix_syntax.py Normal file
View File

@@ -0,0 +1,18 @@
with open("/app/app/api/v1/endpoints/users.py") as f:
lines = f.readlines()
new_block = [
" if current_user.role.value == 'ADMIN':\n",
" query = select(User).where(User.id == user_id)\n",
" else:\n",
" query = select(User).where(\n",
" User.id == user_id,\n",
" User.tenant_id == current_user.tenant_id\n",
" )\n",
]
lines[150:161] = new_block
with open("/app/app/api/v1/endpoints/users.py", "w") as f:
f.writelines(lines)
print("Listo")