Closed LAMaglan closed 2 months ago
might be type issue/validation with SQL
@router.get("/monsters/", response_model=List[Monster]) def get_characters(name: Optional[str] = None, game: Optional[str] = None, db: Session = Depends(get_db)): filters = {} if name: filters['name'] = name if game: filters['game'] = game monsters = crud.get_monsters(db, **filters) if not monsters: raise HTTPException(status_code=404, detail="Characters not found") else: # Sanitize response data sanitized_monsters = [] for monster in monsters: if monster.elementalAffinity is None: monster.elementalAffinity = "" sanitized_monsters.append(monster) return sanitized_monsters ``
Prevents some monsters from being displayed (currently only "Chocobo")
Investigate if still an issue
Not in use, all done in client-side...
might be type issue/validation with SQL