E
E
ekzotika2020-12-24 10:25:11
Django
ekzotika, 2020-12-24 10:25:11

Can't add add_child to Page table?

When adding add_child to Page table

obj_cruise = self.obj_cruise_index.add_child(
                    instance=Cruise(**options))

an error occurs
ОШИБКА:  значение NULL в столбце "translation_key" отношения "wagtailcore_page" нарушает ограничение NOT NULL

But the translation_key should be generated by itself, right? What is the problem here, please?
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-12-24
@bacon

So instance must be a real object in the database?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question