Skip to content

Commit

Permalink
add ability to specify class using a string
Browse files Browse the repository at this point in the history
  • Loading branch information
alexaorrico committed Dec 4, 2017
1 parent 26b7d18 commit 3ad1707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/engine/file_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def all(self, cls=None):
if cls is not None:
new_dict = {}
for key, value in self.__objects.items():
if cls == value.__class__:
if cls == value.__class__ or cls == value.__class__.__name__:
new_dict[key] = value
return new_dict
return self.__objects
Expand Down

0 comments on commit 3ad1707

Please sign in to comment.