v2.0.15: фиксы по ревью Соннета (10 находок)
Deploy contracts-flask / validate (push) Canceled after 0s
Deploy contracts-flask / validate (push) Canceled after 0s
- #1 process.py: target_id→target_hash (UPDATE/DELETE больше не UNRESOLVED) - #2 Dockerfile: COPY upload - #3 prompts.py: убран created_by из SELECT - #4 prompts_bp.py: save_new_version/delete_prompt - #5 llm.py/classify.py: LLM-конфиг из config.py - #6/#7 compare.js: escHtml (XSS) - #8-#10: комментарии + мёртвый gen_random_uuid
This commit is contained in:
@@ -206,10 +206,6 @@ def _pg_to_sqlite(sql):
|
||||
sql = sql.replace("%s", "?")
|
||||
# ::jsonb → убрать (SQLite не типизирует)
|
||||
sql = sql.replace("::jsonb", "")
|
||||
# gen_random_uuid() → хекс-UUID через randomblob
|
||||
if "gen_random_uuid()" in sql:
|
||||
import uuid
|
||||
sql = sql.replace("gen_random_uuid()", "?")
|
||||
# BOOLEAN → INTEGER
|
||||
sql = sql.replace(" BOOLEAN ", " INTEGER ")
|
||||
sql = sql.replace(" bool ", " INTEGER ")
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ def seed_defaults():
|
||||
def list_by_role(role):
|
||||
"""List all versions for a role, newest first."""
|
||||
rows = query(
|
||||
"SELECT id, role, name, is_active, created_by, notes, created_at FROM prompts WHERE role=%s ORDER BY created_at DESC",
|
||||
"SELECT id, role, name, is_active, notes, created_at FROM prompts WHERE role=%s ORDER BY created_at DESC",
|
||||
(role,),
|
||||
)
|
||||
for r in rows:
|
||||
|
||||
Reference in New Issue
Block a user