Skip to content

[bug]: Expression contains mixed types: UUIDField, CharField. You must set output_field. #9252

@MagicRB

Description

@MagicRB

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Setting up Plane in on our own infra, accessing a project under the /spaces/ URL, leads to the exception:

Expression contains mixed types: UUIDField, CharField. You must set output_field.

Steps to reproduce

Self host plane, make a workspace, get that project to show up under /spaces, go there, get the error while the frontend is trying to list issues.

Environment

Production

Browser

Mozilla Firefox

Variant

Self-hosted (on NixOS, custom packaging)

Version

1.3.1 (with a custom patch set implementing generalized OIDC authentication, which I'll publish later. Without it we can't login so it's a bit hard to test this without that patch)

P.S.

I'm mostly opening this to make sure that this bug can happen and that it's not our patchset (though I'm pretty sure it's not). The following patch fixes the issue for us:

diff --git a/apps/api/plane/space/utils/grouper.py b/apps/api/plane/space/utils/grouper.py
index e5f893bd5b..039f814783 100644
--- a/apps/api/plane/space/utils/grouper.py
+++ b/apps/api/plane/space/utils/grouper.py
@@ -127,6 +127,7 @@ def issue_on_results(
                                         Value("/api/assets/v2/static/"),
                                         F("votes__actor__avatar_asset"),
                                         Value("/"),
+                                        output_field=CharField(),
                                     ),
                                 ),
                                 default=F("votes__actor__avatar"),
@@ -161,6 +162,7 @@ def issue_on_results(
                                         Value("/api/assets/v2/static/"),
                                         F("issue_reactions__actor__avatar_asset"),
                                         Value("/"),
+                                        output_field=CharField(),
                                     ),
                                 ),
                                 default=F("issue_reactions__actor__avatar"),
diff --git a/apps/api/plane/space/views/issue.py b/apps/api/plane/space/views/issue.py
index 9e2187466a..a54b79c144 100644
--- a/apps/api/plane/space/views/issue.py
+++ b/apps/api/plane/space/views/issue.py
@@ -669,6 +669,7 @@ class IssueRetrievePublicEndpoint(BaseAPIView):
                                                 Value("/api/assets/v2/static/"),
                                                 F("votes__actor__avatar_asset"),
                                                 Value("/"),
+                                                output_field=CharField(),
                                             ),
                                         ),
                                         When(
@@ -715,6 +716,7 @@ class IssueRetrievePublicEndpoint(BaseAPIView):
                                                 Value("/api/assets/v2/static/"),
                                                 F("votes__actor__avatar_asset"),
                                                 Value("/"),
+                                                output_field=CharField(),
                                             ),
                                         ),
                                         When(

Metadata

Metadata

Assignees

Labels

planesync issues to Plane🐛bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions