corrected formatting

This commit is contained in:
bigcat88
2025-09-14 18:12:00 +03:00
parent a7f2546558
commit a2fc2bbae4
4 changed files with 24 additions and 9 deletions

View File

@@ -101,10 +101,12 @@ class CreateFromHashBody(BaseModel):
return []
if isinstance(v, list):
out = [str(t).strip().lower() for t in v if str(t).strip()]
seen = set(); dedup = []
seen = set()
dedup = []
for t in out:
if t not in seen:
seen.add(t); dedup.append(t)
seen.add(t)
dedup.append(t)
return dedup
if isinstance(v, str):
return [t.strip().lower() for t in v.split(",") if t.strip()]