Skip to content

Commit

Permalink
#32: User ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Aug 15, 2019
1 parent cdd1133 commit b60e2d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/models/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def to_nested_dict(self, includes):
"""
dictionary = self.to_dict()
try:
if type(includes) is not list:
includes = [includes]
includes = includes if type(includes) is list else [includes]
for include in includes:
if type(include) is str:
related_entity = self.get_related_entity(include)
Expand Down

0 comments on commit b60e2d1

Please sign in to comment.