mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 14:01:45 +02:00
[WEB-2359] chore: handled the project id in issue type (#973)
* chore: handled the project in issue type * chore: removed the exception
This commit is contained in:
committed by
GitHub
parent
8588da5e63
commit
cbeb7408fa
@@ -148,7 +148,7 @@ class InboxIssueAPIEndpoint(BaseAPIView):
|
||||
|
||||
# Get the issue type
|
||||
issue_type = IssueType.objects.filter(
|
||||
project_id=project_id, is_default=True
|
||||
project_issue_types__project_id=project_id, is_default=True
|
||||
).first()
|
||||
|
||||
# create an issue
|
||||
|
||||
@@ -45,7 +45,7 @@ def member_sync_task(slug):
|
||||
member["user_id"] = str(member["user_id"])
|
||||
|
||||
# Send request to payment server to sync workspace members
|
||||
response = requests.patch(
|
||||
_ = requests.patch(
|
||||
f"{settings.PAYMENT_SERVER_BASE_URL}/api/workspaces/{workspace_id}/subscriptions/",
|
||||
json={
|
||||
"slug": slug,
|
||||
@@ -58,8 +58,6 @@ def member_sync_task(slug):
|
||||
},
|
||||
)
|
||||
|
||||
response.raise_for_status()
|
||||
|
||||
# Refresh workspace license
|
||||
resync_workspace_license(slug, force=True)
|
||||
else:
|
||||
|
||||
@@ -365,12 +365,12 @@ class IssueCreateSerializer(BaseSerializer):
|
||||
if issue_type_id:
|
||||
# Check if issue type is valid
|
||||
issue_type = IssueType.objects.filter(
|
||||
project_id=project_id, id=issue_type_id
|
||||
project_issue_types__project_id=project_id, id=issue_type_id
|
||||
).first()
|
||||
else:
|
||||
# Get default issue type
|
||||
issue_type = IssueType.objects.filter(
|
||||
project_id=project_id, is_default=True
|
||||
project_issue_types__project_id=project_id, is_default=True
|
||||
).first()
|
||||
|
||||
issue = Issue.objects.create(
|
||||
|
||||
@@ -157,7 +157,8 @@ class InboxIssuePublicViewSet(BaseViewSet):
|
||||
)
|
||||
|
||||
issue_type = IssueType.objects.filter(
|
||||
project_id=project_deploy_board.project_id, is_default=True
|
||||
project_issue_types__project_id=project_deploy_board.project_id,
|
||||
is_default=True,
|
||||
).first()
|
||||
|
||||
# create an issue
|
||||
|
||||
Reference in New Issue
Block a user