Open LiamKearn opened 2 years ago
EG. https://github.com/silverstripe/silverstripe-populate/pull/32/files#diff-93dc79eb6bab3a17b4ea782351fd413f3b01e654949378c6b8dd974acdbc26ecR81 Foreach expects to iterate but doesn't get an iterable. Probably because it was removed here: https://github.com/silverstripe/silverstripe-populate/pull/32/files#diff-93dc79eb6bab3a17b4ea782351fd413f3b01e654949378c6b8dd974acdbc26ecL38.
Not sure what config returns if the config option is never set but It might be the cause.
It's not an array because it's undefined unless you set a value in your app.yml
. Ran into the same issue myself. If you don't want to truncate anything you can set an empty array in app.yml
to prevent the error.
DNADesign\Populate\Populate:
truncate_objects: []
Thanks @davejtoews, should have moved to fix this when I discovered it!
This will make our CI a little cleaner if when we update next :)
This should be in the readme.
Is there a way to truncate only the objects created using the module?
Is there a way to truncate only the objects created using the module?
No. There's no record or a way of knowing which objects were created by this module and which existed before or after.
truncate_objects
is no longer an array and seems to be causing issue for us.I think this is related to the removal of the default in #32 .