Thursday, January 27, 2022

Re: Should Query.add_ordering() raise FieldError exception?

pls, ignore this and next duplicate mail 
i already got answer  

четверг, 27 января 2022 г. в 17:02:41 UTC+3, Камиль Талипов:
The add_ordering() method has a call to the names_to_path() function with the following comment:

# names_to_path() validates the lookup. A descriptive
# FieldError will be raise if it's not.
self.names_to_path(item.split(LOOKUP_SEP), self.model._meta)

(django.db.models.sql.query: ~1989 line)

Function names_to_path have optional fail_on_missing argument, but is don't pass  (== fail_on_missing=False) in call from add_ordering.

It's normal ?

It was added after the closed ticket https://code.djangoproject.com/ticket/31426

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9fefa287-0f8d-4803-9850-198c82ef303cn%40googlegroups.com.

No comments:

Post a Comment