#5101 (Number of content types differs by 1 in docs/projects/roger.rst)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
Children
Comments
- 3 years, 1 month ago by Luc Saffre about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : This made me discover that react.Renderer.actor2json() was the place that called the method with an abstract model. I added an if statement and voilà the issue is gone.
- 3 years, 1 month ago by Luc Saffre about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : I added an "assert model._meta is not abstract" before most places where we call get_for_model() and then ran "inv prep test" on book.
- 3 years, 1 month ago by Luc Saffre about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : Good work. Aha, so ContentType.objects.get_for_model() happens to create database rows. I find this very strange. I will dig into this...
- 3 years, 1 month ago by Sharif Mehedi about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : I just added a bit more on [url gitlab.com/lino-framework/book/-/commit/e78650602529f034875c24d0b02afa3ab8dfd981 docs/projects/roger.rst]. @luc , take a look at it.
- 3 years, 1 month ago by Sharif Mehedi about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : It's not just the react renderer but lots of cases where we use ContentType.objects.get_for_model , which creates a ContentType object if does not exists. And will have an extra contenttype for each abstract model passed to the get_for_model method.
- 3 years, 1 month ago by Sharif Mehedi about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : Right now I don't have it either on my machine. I think it's coming from react renderer. I am relating this issue to docs/projects/roger.rst and leaving noi at peace, because the issue is caused from the same place.
- 3 years, 2 months ago by Luc Saffre about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : Or was I just mistaken when reading the error report? I now changed the 104 into 103 and everything seems fine with this doctest. Also for you, Sharif?
- 3 years, 2 months ago by Luc Saffre about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : This issue is still there. The funny thing is that besides the number of rows in ContentType there is no difference in the output of analyzer.show_db_overview()
- 3 years, 2 months ago by Luc Saffre about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : On my machine the noi1e demo project should have 103 database models, but on Sharif's machine it seems to have 104 models..
- 3 years, 2 months ago by Luc Saffre about #5101 (Number of content types differs by 1 in docs/projects/roger.rst) : Created new Ticket #5101 (Number of content types differs by 1 in docs/specs/noi/db.rst).