chore: page version migrations (#5103)

* chore: rewrite page version migration to remove data back migration

* dev: rename exporter history choice field

* dev: update migration
This commit is contained in:
Nikhil 2024-07-10 19:37:04 +05:30 committed by GitHub
parent f9a3778c7f
commit c6db050443
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 114 additions and 424 deletions

View file

@ -33,7 +33,6 @@ from plane.db.models import (
IssueVote,
IssueRelation,
State,
IssueType,
)
@ -136,15 +135,10 @@ class IssueCreateSerializer(BaseSerializer):
workspace_id = self.context["workspace_id"]
default_assignee_id = self.context["default_assignee_id"]
# Get Issue Type
issue_type = (
IssueType.objects.filter(project_id=project_id)
.order_by("created_at")
.first()
)
# Create Issue
issue = Issue.objects.create(
**validated_data, project_id=project_id, type=issue_type
**validated_data,
project_id=project_id,
)
# Issue Audit Users

View file

@ -47,7 +47,6 @@ from plane.db.models import (
ProjectMember,
State,
Workspace,
IssueType,
)
from plane.utils.cache import cache_response
from plane.bgtasks.webhook_task import model_activity
@ -343,13 +342,7 @@ class ProjectViewSet(BaseViewSet):
.first()
)
# Create the issue type
IssueType.objects.create(
name="Task",
description="A task that needs to be done",
project_id=project.id,
)
# Create the model activity
model_activity.delay(
model_name="project",
model_id=str(project.id),