Skip to content

Commit

Permalink
Merge pull request #450 from open5e/v2_search_charclass_lookup
Browse files Browse the repository at this point in the history
Missing a lookup for character class.
augustjohnson authored Apr 22, 2024
2 parents bc4048e + 0a7bab3 commit eed2ad4
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
@@ -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",
@@ -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 eed2ad4

Please sign in to comment.