#4509 (**filter in Table.get_request_queryset seem to fail on the first request.)
by Sharif Mehedi · in Developers · assigned to Sharif Mehedi
Kurzbeschreibung
Kinder
Kommentare
- 4 Jahre, 5 Monate ago von Sharif Mehedi Antwort auf Luc Saffre about #4509 (**filter in Table.get_request_queryset seem to fail on the first request.) : And about the assertion, can we through that away too? and can we pass **filter into Table.get_queryset in [url gitlab.com/lino-framework/lino/-/blob/0b9e11f3cbf824c58a25dec5c2fc7af22da3deb3/lino/core/dbtables.py#L695 here], I think it's safe and logical to do so.
- 4 Jahre, 5 Monate ago von Luc Saffre Antwort auf Luc Saffre about #4509 (**filter in Table.get_request_queryset seem to fail on the first request.) : I wrote this code several years ago for some complex VAT listing, before I found a better solution. ATM I think it's okay to say that Lino doesn't support queries on abstract models.
- 4 Jahre, 5 Monate ago von Luc Saffre about #4509 (**filter in Table.get_request_queryset seem to fail on the first request.) (2 Antworten) : Yes. I think that we can throw away the whole "if self.model._meta.abstract" block including the filter kwargs. This method is not meant to be called from application code (we have Table.request() for that). But of course we should do this change in a separate commit and run the full test suite befo...
- 4 Jahre, 5 Monate ago von Sharif Mehedi about #4509 (**filter in Table.get_request_queryset seem to fail on the first request.) : We are passing `keyword arguments` as **filter in Table.get_request_queryset. but in [url gitlab.com/lino-framework/lino/-/blob/0b9e11f3cbf824c58a25dec5c2fc7af22da3deb3/lino/core/dbtables.py#L679 dbtables.py] we are only using it when the Table.model is abstract. And there is an assertion, which I w...