Updated manager.py with f-strings.

This commit is contained in:
Kovitikus 2019-09-10 13:22:05 -04:00
parent d70eb388f1
commit 37912417dc

View file

@ -164,9 +164,9 @@ class AccountDBManager(TypedObjectManager, UserManager):
if typeclass: if typeclass:
# we accept both strings and actual typeclasses # we accept both strings and actual typeclasses
if callable(typeclass): if callable(typeclass):
typeclass = "%s.%s" % (typeclass.__module__, typeclass.__name__) typeclass = f"{typeclass.__module__}.{typeclass.__name__}"
else: else:
typeclass = "%s" % typeclass typeclass = f"{typeclass}"
query["db_typeclass_path"] = typeclass query["db_typeclass_path"] = typeclass
if exact: if exact:
matches = self.filter(**query) matches = self.filter(**query)