You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two models with the same name but under different apps. music.Album and music_v2.album so the issue is that when DjangoModelFactory is trying to populate the data is using the wrong model
Model / Factory code
class AlbumFactory(DjangoModelFactory):
artist = SubFactory(ArtistFactory)
name = Faker('catch_phrase')
class Meta:
model = 'music.Album'
Notes
It says this when is populating the data.. Is using music_v2 model instead of music
The text was updated successfully, but these errors were encountered:
Did you have both apps installed in Django?
The logic to resolve the model asks the Django apps registry for the app and model name, so if they are registered correctly, FactoryBoy should be using the correct model.
If you find that it is not the case, please reopen, with some code to reproduce the issue.
Description
I have two models with the same name but under different apps.
music.Album and music_v2.album
so the issue is that whenDjangoModelFactory
is trying to populate the data is using the wrong modelModel / Factory code
Notes
It says this when is populating the data.. Is using
music_v2
model instead ofmusic
The text was updated successfully, but these errors were encountered: