Matthew Westcott
unread,Aug 13, 2016, 10:06:27 PM8/13/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wag...@googlegroups.com
Hi Rani,
It works for me:
>>> from wagtail.wagtailcore.models import Collection
>>> root_collection = Collection.get_first_root_node()
>>> root_collection.add_child(name='test')
<Collection: test>
Can you give the full stack trace?
Cheers,
- Matt
On 13 Aug 2016, at 19:52, rani....@snip.today wrote:
> Hi,
>
> I have a simple script to upload multiple images and I works fine.
> I'm trying to create a new collection for my images (I get the collection name as an argument).
> It's supposed to be pretty simple but it doesn't work.
>
> root_collection = Collection.get_first_root_node()
> base_collection.add_child(name='test')
>
> I'm getting this error - AttributeError: 'NoneType' object has no attribute '_inc_path' -
> I have no idea why.
>
> Thanks!
>
> Rani