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
hi @legshort we can use below function and solve the above issue.
def generate_random_a():
return A(
career=[fake.word() for _ in range(3)], # Generate a list of 3 random words
main_image=baker.make('PILImage') # Generate a random image
)
a = baker.make(A, _fill_optional=True, _model_instance_generator=generate_random_a)
if you like the solution please assign me the issue.
Describe the issue
Generating random data is not working below the condition.
ArrayField with default=list
FileField with default=None
To Reproduce
Expected behavior
ArrayField and FileField should be filled with random data.
Versions
The text was updated successfully, but these errors were encountered: