Skip to content
Browse files

fix ambiguity with more than 3 apps

  • Loading branch information...
1 parent 1ac6c8f commit e45488b9000fd86aac34031854b601d7c2de3c78 @vandersonmota committed
Showing with 9 additions and 1 deletion.
  1. +1 −1 model_mommy/mommy.py
  2. +1 −0 runtests.py
  3. +1 −0 test/ambiguous2/__init__.py
  4. +6 −0 test/ambiguous2/models.py
View
2 model_mommy/mommy.py
@@ -202,7 +202,7 @@ def _populate(self):
ambiguous_models.append(name)
for name in ambiguous_models:
- unique_models.pop(name)
+ unique_models.pop(name, None)
self._ambiguous_models = ambiguous_models
self._unique_models = unique_models
View
1 runtests.py
@@ -29,6 +29,7 @@ def configure_settings(options):
'django.contrib.contenttypes',
'test.generic',
'test.ambiguous',
+ 'test.ambiguous2',
),
SITE_ID=1,
TEST_RUNNER='django.test.simple.DjangoTestSuiteRunner',
View
1 test/ambiguous2/__init__.py
@@ -0,0 +1 @@
+# coding: utf-8
View
6 test/ambiguous2/models.py
@@ -0,0 +1,6 @@
+# coding: utf-8
+from django.db import models
+
+
+class Ambiguous(models.Model):
+ name = models.CharField(max_length=20)

0 comments on commit e45488b

Please sign in to comment.
Something went wrong with that request. Please try again.