Repository: model-bakers/model_bakery

Issue:
Using make_recipe with _quantity together with related key only applies to last item created
Using make_recipe with _quantity together with related key only applies to last item created

Given this setup code:

mommy_recipes.py:
```python
dog1 = recipe.Recipe(
     Dog
)

dog2 = recipe.Recipe(
    Dog
)

company = recipe.Recipe(
    Company
)

incomplete_person = recipe.Recipe(
    Person,
    dog_set=recipe.related(dog1, dog2)
)

complete_person = incomplete_person.extend(
    company=recipe.foreign_key(company)
)
```

In a test python file:
```python
people = mommy.make_recipe("complete_person", _quantity=3)
```

## Expected behavior

That each model in `people` has the 2 dog instances.

## Actual behavior

Only the last item in `people` has the 2 dog instances.  The first 2 are empty.


## Reproduction Steps

How to reproduce this issue.

See summary above

### Versions

Python: 3.6
Django: 1.9
Model Mommy: 1.6.0


Discussion:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7c6c91..1c0dc75 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 ### Added
 
 ### Changed
+- Fix `make_recipe` to work with `_quantity` (#28)
 
 ### Removed
 
diff --git a/model_bakery/baker.py b/model_bakery/baker.py
index 23b2389..61e16a9 100644
--- a/model_bakery/baker.py
+++ b/model_bakery/baker.py
@@ -638,6 +638,9 @@ class Baker(Generic[M]):
         for key, values in attrs.items():
             manager = getattr(instance, key)
 
+            if callable(values):
+                values = values()
+
             for value in values:
                 # Django will handle any operation to persist nested non-persisted FK because
                 # save doesn't do so and, thus, raises constraint errors. That's why save()
@@ -659,6 +662,9 @@ class Baker(Generic[M]):
 
     def _handle_m2m(self, instance: Model):
         for key, values in self.m2m_dict.items():
+            if callable(values):
+                values = values()
+
             for value in values:
                 if not value.pk:
                     value.save()
diff --git a/model_bakery/recipe.py b/model_bakery/recipe.py
index c1df72b..d2f11e7 100644
--- a/model_bakery/recipe.py
+++ b/model_bakery/recipe.py
@@ -78,7 +78,8 @@ class Recipe(Generic[M]):
                 else:
                     mapping[k] = v.recipe.prepare(_using=_using, **recipe_attrs)
             elif isinstance(v, related):
-                mapping[k] = v.make()
+                mapping[k] = v.make
+
         mapping.update(new_attrs)
         mapping.update(rel_fields_attrs)
         return mapping


Test patch:
diff --git a/tests/test_recipes.py b/tests/test_recipes.py
index 2cf531a..077fe85 100644
--- a/tests/test_recipes.py
+++ b/tests/test_recipes.py
@@ -406,6 +406,11 @@ class TestForeignKey:
         assert lady.dog_set.all()[0].breed == "Pug"
         assert lady.dog_set.all()[1].breed == "Basset"
 
+    def test_related_models_recipes_make_mutiple(self):
+        ladies = baker.make_recipe("tests.generic.dog_lady", _quantity=2)
+        assert ladies[0].dog_set.count() == 2
+        assert ladies[1].dog_set.count() == 2
+
     def test_nullable_related(self):
         nullable = baker.make_recipe("tests.generic.nullable_related")
         assert nullable.dummynullfieldsmodel_set.count() == 1