Skip to content

Commit

Permalink
Fix #349 -- substract lists in Baker.get_fields() instead of castin…
Browse files Browse the repository at this point in the history
…g to set
  • Loading branch information
amureki committed Oct 11, 2022
1 parent 912d4a8 commit 63f9abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_bakery/baker.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def prepare(
return self._make(**params)

def get_fields(self) -> Any:
return set(self.model._meta.get_fields()) - set(self.get_related())
return [f for f in self.model._meta.get_fields() if f not in self.get_related()]

def get_related(
self,
Expand Down

0 comments on commit 63f9abe

Please sign in to comment.