Merge branch 'preview' of github.com:makeplane/plane into preview
This commit is contained in:
commit
51ca353577
2 changed files with 16 additions and 4 deletions
|
|
@ -91,6 +91,7 @@ def issue_on_results(issues, group_by, sub_group_by):
|
|||
Case(
|
||||
When(
|
||||
votes__isnull=False,
|
||||
votes__deleted_at__isnull=True,
|
||||
then=JSONObject(
|
||||
vote=F("votes__vote"),
|
||||
actor_details=JSONObject(
|
||||
|
|
@ -117,13 +118,14 @@ def issue_on_results(issues, group_by, sub_group_by):
|
|||
default=None,
|
||||
output_field=JSONField(),
|
||||
),
|
||||
filter=Q(votes__isnull=False),
|
||||
filter=Q(votes__isnull=False,votes__deleted_at__isnull=True),
|
||||
distinct=True,
|
||||
),
|
||||
reaction_items=ArrayAgg(
|
||||
Case(
|
||||
When(
|
||||
issue_reactions__isnull=False,
|
||||
issue_reactions__deleted_at__isnull=True,
|
||||
then=JSONObject(
|
||||
reaction=F("issue_reactions__reaction"),
|
||||
actor_details=JSONObject(
|
||||
|
|
@ -150,7 +152,7 @@ def issue_on_results(issues, group_by, sub_group_by):
|
|||
default=None,
|
||||
output_field=JSONField(),
|
||||
),
|
||||
filter=Q(issue_reactions__isnull=False),
|
||||
filter=Q(issue_reactions__isnull=False, issue_reactions__deleted_at__isnull=True),
|
||||
distinct=True,
|
||||
),
|
||||
).values(*required_fields, "vote_items", "reaction_items")
|
||||
|
|
|
|||
|
|
@ -701,6 +701,7 @@ class IssueRetrievePublicEndpoint(BaseAPIView):
|
|||
Case(
|
||||
When(
|
||||
votes__isnull=False,
|
||||
votes__deleted_at__isnull=True,
|
||||
then=JSONObject(
|
||||
vote=F("votes__vote"),
|
||||
actor_details=JSONObject(
|
||||
|
|
@ -732,7 +733,11 @@ class IssueRetrievePublicEndpoint(BaseAPIView):
|
|||
output_field=JSONField(),
|
||||
),
|
||||
filter=Case(
|
||||
When(votes__isnull=False, then=True),
|
||||
When(
|
||||
votes__isnull=False,
|
||||
votes__deleted_at__isnull=True,
|
||||
then=True,
|
||||
),
|
||||
default=False,
|
||||
output_field=JSONField(),
|
||||
),
|
||||
|
|
@ -742,6 +747,7 @@ class IssueRetrievePublicEndpoint(BaseAPIView):
|
|||
Case(
|
||||
When(
|
||||
issue_reactions__isnull=False,
|
||||
issue_reactions__deleted_at__isnull=True,
|
||||
then=JSONObject(
|
||||
reaction=F("issue_reactions__reaction"),
|
||||
actor_details=JSONObject(
|
||||
|
|
@ -775,7 +781,11 @@ class IssueRetrievePublicEndpoint(BaseAPIView):
|
|||
output_field=JSONField(),
|
||||
),
|
||||
filter=Case(
|
||||
When(issue_reactions__isnull=False, then=True),
|
||||
When(
|
||||
issue_reactions__isnull=False,
|
||||
issue_reactions__deleted_at__isnull=True,
|
||||
then=True,
|
||||
),
|
||||
default=False,
|
||||
output_field=JSONField(),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue