vandersonmota/model_mommy — pull request #121 by tkrajca (2013-09-09 03:14:51+00:00)
Title: Fixed #113 - a unique vaildation error might be thrown if a to-be created instance exists.

```python
class LonelyPersonWithPostSaveHook(models.Model):
only_friend = models.OneToOneField(User)

def lonely_user_with_post_save_hook(sender, instance, created, **kwargs):
"""Create a person when a new user account is created"""
if created:
lp = LonelyPersonWithPostSaveHook()
lp.only_friend = instance
lp.save()

post_save.connect(lonely_user_with_post_save_hook, sender=User)

mommy.make(LonelyPersonWithPostSaveHook) # used to throw unique validation error in Mommy.instance()
```

This pull request fixes this behaviour (tests included).