Skip to content

Commit

Permalink
Added factory file to apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Nehemiah60 committed Feb 9, 2023
1 parent a2b5eeb commit 762f44a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions project/accounts/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class Meta:
profile_image = factory.Faker("image_url")
profile_image_thumb = factory.Faker("image_url")

@factory.post_generation
def categories(self, create, extracted, **kwargs):
if not create:
return
if extracted:
for category in extracted:
self.categories.add(category)
# @factory.post_generation
# def categories(self, create, extracted, **kwargs):
# if not create:
# return
# if extracted:
# for category in extracted:
# self.categories.add(category)

# @factory.post_generation
# def tags(self, create, extracted, **kwargs):
Expand Down

0 comments on commit 762f44a

Please sign in to comment.