You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the versions of an image correctly seems to generate the following query. I tried this on an image that was only in draft mode. When you query image.versions.all() you should be getting a single version.
# image.versions.all().query, this is an empty queryset
SELECT "djangocms_versioning_version"."id", "djangocms_versioning_version"."created",
"djangocms_versioning_version"."modified", "djangocms_versioning_version"."created_by_id",
"djangocms_versioning_version"."number", "djangocms_versioning_version"."content_type_id",
"djangocms_versioning_version"."object_id", "djangocms_versioning_version"."state",
"djangocms_versioning_version"."source_id" FROM "djangocms_versioning_version"
WHERE ("djangocms_versioning_version"."content_type_id" = 48
AND "djangocms_versioning_version"."object_id" = 5419)
If you get it through the grouper it will give the following query instead. It gave back one result as expected.
Version.objects.filter_by_grouper(image.grouper).query
SELECT "djangocms_versioning_version"."id", "djangocms_versioning_version"."created",
"djangocms_versioning_version"."modified", "djangocms_versioning_version"."created_by_id",
"djangocms_versioning_version"."number", "djangocms_versioning_version"."content_type_id",
"djangocms_versioning_version"."object_id", "djangocms_versioning_version"."state",
"djangocms_versioning_version"."source_id" FROM "djangocms_versioning_version"
WHERE ("djangocms_versioning_version"."object_id"
IN (SELECT U0."id" AS Col1 FROM "filer_file" U0 WHERE U0."grouper_id" = 4714)
AND "djangocms_versioning_version"."content_type_id" IN (48, 45, 326)
The text was updated successfully, but these errors were encountered:
Getting the versions of an image correctly seems to generate the following query. I tried this on an image that was only in draft mode. When you query image.versions.all() you should be getting a single version.
If you get it through the grouper it will give the following query instead. It gave back one result as expected.
The text was updated successfully, but these errors were encountered: