Skip to content

Commit

Permalink
Merge pull request #453 from open5e/staging
Browse files Browse the repository at this point in the history
V2 search lookup error for character class in v1 data.
  • Loading branch information
augustjohnson authored Apr 22, 2024
2 parents f9b0512 + 30fee7c commit cd59f0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api_v2/serializers/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_route(self, obj):
"Item":"items",
"Creature":"creatures",
"Spell":"spells",
"CharacterClass":"class",
"CharacterClass":"classes",
"Monster":"monsters",
"MagicItem":"magicitems",
"Section":"sections",
Expand All @@ -81,7 +81,9 @@ def get_route(self, obj):
"Feat":"feats",
"Race":"races",
"Plane":"planes",
"CharClass":"classes"
}


route = "{}/{}/".format(obj.schema_version,route_lookup[obj.object_model])
return route

0 comments on commit cd59f0f

Please sign in to comment.