Simon Charette
198b30168d
Fixed #36135 -- Fixed reverse GenericRelation prefetching.
...
The get_(local|foreign)_related_value methods of GenericRelation must be
reversed because it defines (from|to)_fields and associated related_fields
in the reversed order as it's effectively a reverse GenericForeignKey
itself.
The related value methods must also account for the fact that referenced
primary key values might be stored as a string on the model defining the
GenericForeignKey but as integer on the model defining the GenericRelation.
This is achieved by calling the to_python method of the involved content type
in get_foreign_related_value just like GenericRelatedObjectManager does.
Lastly reverse many-to-one manager's prefetch_related_querysets should use
set_cached_value instead of direct attribute assignment as direct assignment
might are disallowed on ReverseManyToOneDescriptor descriptors. This is likely
something that was missed in f5233dc (refs #32511 ) when the is_cached guard
was added.
Thanks 1xinghuan for the report.
2025-02-03 09:39:14 +00:00
..
2022-02-07 20:37:05 +01:00
2025-01-22 14:56:44 +01:00
2024-02-05 21:42:04 -03:00
2022-06-22 07:50:24 +02:00
2025-01-27 09:23:56 +01:00
2024-02-29 10:01:18 +01:00
2024-11-20 13:23:18 +01:00
2023-07-07 08:06:01 +02:00
2024-11-29 11:23:04 +01:00
2024-12-11 17:25:47 +01:00
2025-01-15 22:28:37 +01:00
2025-01-30 11:19:05 +00:00
2025-01-23 10:38:15 +01:00
2025-01-14 16:47:07 +01:00
2024-01-26 12:45:07 +01:00
2025-01-30 11:17:17 +00:00
2023-12-31 10:01:31 +01:00
2023-09-25 08:17:03 +02:00
2024-11-27 11:00:05 +01:00
2024-11-28 17:43:46 +01:00
2025-02-01 22:49:07 -03:00
2025-02-01 18:43:10 +01:00
2017-06-01 13:23:48 -04:00
2024-01-26 12:45:07 +01:00
2025-01-15 22:28:37 +01:00
2023-01-05 19:26:56 +01:00
2025-02-01 18:43:10 +01:00
2024-09-05 18:25:05 -03:00
2024-10-15 16:39:12 +02:00
2025-01-28 12:05:53 +00:00
2022-11-10 13:52:17 +01:00
2025-01-15 22:28:37 +01:00
2025-01-15 22:28:37 +01:00
2024-01-26 12:45:07 +01:00
2024-10-16 11:52:22 +02:00
2022-10-08 08:07:38 +02:00
2024-07-09 09:15:38 +02:00
2022-10-08 08:07:38 +02:00
2022-10-08 08:07:38 +02:00
2024-02-09 09:37:13 +01:00
2023-08-22 12:42:57 +02:00
2022-10-07 13:05:35 +02:00
2023-01-17 11:49:15 +01:00
2025-01-06 10:08:32 +01:00
2024-01-26 12:45:07 +01:00
2024-11-18 15:00:33 +01:00
2024-08-30 08:54:49 -03:00
2024-12-02 16:01:37 +01:00
2024-04-23 13:17:17 -03:00
2025-01-02 23:49:49 -03:00
2024-02-08 18:41:32 +01:00
2024-10-07 14:19:41 +02:00
2023-12-06 09:26:11 +01:00
2024-01-26 12:45:07 +01:00
2014-11-03 11:56:37 -05:00
2022-02-07 20:37:05 +01:00
2025-01-30 12:48:45 +00:00
2022-10-08 08:07:38 +02:00
2024-08-13 11:26:17 +02:00
2023-06-29 21:52:52 +02:00
2023-08-30 22:57:40 -03:00
2025-01-23 12:43:04 -03:00
2025-01-15 22:28:37 +01:00
2024-07-09 09:21:19 -03:00
2024-03-24 16:05:36 +01:00
2025-01-27 10:32:19 +01:00
2024-01-31 16:10:05 +01:00
2022-10-08 08:07:38 +02:00
2024-09-19 08:51:30 +02:00
2024-01-26 12:45:07 +01:00
2025-01-21 09:09:43 +01:00
2025-01-17 15:55:37 +01:00
2025-01-15 22:28:37 +01:00
2023-09-18 13:23:21 +02:00
2023-09-08 08:47:11 +02:00
2024-12-18 13:08:14 +01:00
2022-02-07 20:37:05 +01:00
2025-01-15 15:36:57 +01:00
2025-01-15 22:28:37 +01:00
2024-08-28 11:44:05 -03:00
2024-11-14 15:53:49 -03:00
2024-05-27 10:54:25 +02:00
2025-01-23 11:36:43 +01:00
2015-02-03 18:30:46 -05:00
2024-05-28 12:44:07 +02:00
2025-01-03 16:28:21 +01:00
2024-03-01 07:15:32 +01:00
2025-01-02 13:06:47 +01:00
2023-01-24 10:20:27 +01:00
2024-06-20 09:43:40 +02:00
2024-09-11 12:42:17 +02:00
2024-01-26 12:45:07 +01:00
2024-01-26 12:45:07 +01:00
2022-10-08 08:07:38 +02:00
2022-09-30 18:18:33 +02:00
2022-10-08 08:07:38 +02:00
2022-02-07 20:37:05 +01:00
2022-02-07 20:37:05 +01:00
2025-01-31 11:54:12 +00:00
2022-02-07 20:37:05 +01:00
2025-01-15 22:28:37 +01:00
2025-01-15 22:28:37 +01:00
2024-08-08 21:34:01 -03:00
2024-01-26 12:45:07 +01:00
2023-02-01 11:04:38 +01:00
2023-02-01 11:04:38 +01:00
2024-11-27 12:51:41 +01:00
2025-01-22 10:56:30 +01:00
2024-02-13 14:47:49 +01:00
2025-01-20 14:07:28 +01:00
2025-01-20 14:07:28 +01:00
2025-01-15 22:28:37 +01:00
2024-06-13 16:21:53 +02:00
2022-10-08 08:07:38 +02:00
2025-01-14 16:21:19 +01:00
2024-01-26 12:45:07 +01:00
2024-05-07 14:25:51 +02:00
2022-07-26 11:41:19 +02:00
2022-10-08 08:07:38 +02:00
2025-01-15 22:28:37 +01:00
2024-02-05 08:25:23 +01:00
2022-02-07 20:37:05 +01:00
2022-02-07 20:37:05 +01:00
2022-02-07 20:37:05 +01:00
2022-10-08 08:07:38 +02:00
2024-01-26 12:45:07 +01:00
2025-01-15 22:28:37 +01:00
2022-10-08 08:07:38 +02:00
2024-01-26 12:45:07 +01:00
2023-02-27 07:10:19 +01:00
2023-06-23 09:29:35 +02:00
2025-01-30 12:48:45 +00:00
2025-02-03 09:39:14 +00:00
2022-02-07 20:37:05 +01:00
2022-02-22 10:29:38 +01:00
2024-01-26 12:45:07 +01:00
2025-01-14 16:21:19 +01:00
2024-03-07 06:01:01 +01:00
2024-09-09 12:02:18 +02:00
2025-02-01 08:53:14 +01:00
2023-06-10 20:43:05 +02:00
2024-01-26 12:45:07 +01:00
2024-10-31 06:37:14 +01:00
2023-02-01 11:04:38 +01:00
2023-06-01 19:50:47 +01:00
2024-12-18 10:39:20 +01:00
2024-01-26 12:45:07 +01:00
2024-03-13 17:55:15 +01:00
2023-12-31 10:01:31 +01:00
2025-01-09 13:00:29 -03:00
2024-11-14 15:53:49 -03:00
2024-02-08 11:36:28 +01:00
2023-09-18 22:12:40 +02:00
2024-10-16 11:52:22 +02:00
2023-02-01 11:04:38 +01:00
2023-12-31 10:01:31 +01:00
2024-05-14 22:08:29 -03:00
2024-08-30 10:00:51 +02:00
2023-02-01 11:04:38 +01:00
2024-06-18 17:25:43 +02:00
2024-11-01 11:43:49 +01:00
2025-01-23 10:38:15 +01:00
2025-01-03 08:41:34 +01:00
2024-11-11 14:47:04 +01:00
2022-02-07 20:37:05 +01:00
2025-01-20 14:07:28 +01:00
2025-01-20 14:07:28 +01:00
2023-10-22 14:26:38 +02:00
2022-09-06 12:21:36 +02:00
2024-01-26 12:45:07 +01:00
2023-02-01 11:04:38 +01:00
2023-03-18 13:19:40 +01:00
2025-01-15 22:28:37 +01:00
2025-01-16 13:12:33 +01:00
2024-12-11 16:40:28 -03:00
2025-01-04 00:29:53 -03:00
2025-01-23 10:38:15 +01:00
2024-08-05 17:33:12 +02:00
2025-01-15 13:46:06 -03:00
2025-01-20 14:07:28 +01:00
2023-12-31 10:01:31 +01:00
2023-06-08 20:41:18 +02:00
2023-09-07 15:47:26 -03:00
2025-01-20 14:07:28 +01:00
2023-09-07 15:47:26 -03:00
2024-01-26 12:45:07 +01:00