Skip to content

Commit

Permalink
Merge pull request #15 from edenartlab/stage
Browse files Browse the repository at this point in the history
debug character fetch
  • Loading branch information
genekogan authored Jan 20, 2024
2 parents 5a15cbb + 164c6f5 commit 9528619
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@


def get_character_data(character_id: str):
print("--get character data", character_id)

character = db["characters"].find_one({
"_id": ObjectId(character_id)
})

if not character:
print(f"---Character not found: {character_id}")
raise Exception("Character not found")
else:
print(f"---Character found: {character_id}")
print(character)

return character

0 comments on commit 9528619

Please sign in to comment.