forked from github/plane
dev: add imports for back migration and add migration for views (#707)
This commit is contained in:
parent
6a579f85ad
commit
86ec46db2c
@ -3,8 +3,7 @@ import uuid
|
|||||||
import random
|
import random
|
||||||
from django.contrib.auth.hashers import make_password
|
from django.contrib.auth.hashers import make_password
|
||||||
from plane.db.models import ProjectIdentifier
|
from plane.db.models import ProjectIdentifier
|
||||||
from plane.db.models import Issue, IssueComment, User, Project, ProjectMember
|
from plane.db.models import Issue, IssueComment, User, Project, ProjectMember, Label
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Update description and description html values for old descriptions
|
# Update description and description html values for old descriptions
|
||||||
@ -148,7 +147,7 @@ def update_user_view_property():
|
|||||||
"collapsed": True,
|
"collapsed": True,
|
||||||
"issueView": "list",
|
"issueView": "list",
|
||||||
"filterIssue": None,
|
"filterIssue": None,
|
||||||
"groupByProperty": True,
|
"groupByProperty": None,
|
||||||
"showEmptyGroups": True,
|
"showEmptyGroups": True,
|
||||||
}
|
}
|
||||||
updated_project_members.append(project_member)
|
updated_project_members.append(project_member)
|
||||||
@ -161,6 +160,7 @@ def update_user_view_property():
|
|||||||
print(e)
|
print(e)
|
||||||
print("Failed")
|
print("Failed")
|
||||||
|
|
||||||
|
|
||||||
def update_label_color():
|
def update_label_color():
|
||||||
try:
|
try:
|
||||||
labels = Label.objects.filter(color="")
|
labels = Label.objects.filter(color="")
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 3.2.18 on 2023-04-04 21:50
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import plane.db.models.project
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('db', '0025_auto_20230331_0203'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='projectmember',
|
||||||
|
name='view_props',
|
||||||
|
field=models.JSONField(default=plane.db.models.project.get_default_props),
|
||||||
|
),
|
||||||
|
]
|
@ -26,7 +26,7 @@ def get_default_props():
|
|||||||
"collapsed": True,
|
"collapsed": True,
|
||||||
"issueView": "list",
|
"issueView": "list",
|
||||||
"filterIssue": None,
|
"filterIssue": None,
|
||||||
"groupByProperty": True,
|
"groupByProperty": None,
|
||||||
"showEmptyGroups": True,
|
"showEmptyGroups": True,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ class ProjectMember(ProjectBaseModel):
|
|||||||
)
|
)
|
||||||
comment = models.TextField(blank=True, null=True)
|
comment = models.TextField(blank=True, null=True)
|
||||||
role = models.PositiveSmallIntegerField(choices=ROLE_CHOICES, default=10)
|
role = models.PositiveSmallIntegerField(choices=ROLE_CHOICES, default=10)
|
||||||
view_props = models.JSONField(null=True)
|
view_props = models.JSONField(default=get_default_props)
|
||||||
default_props = models.JSONField(default=get_default_props)
|
default_props = models.JSONField(default=get_default_props)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
Loading…
Reference in New Issue
Block a user