mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fixed bug with missed color #FFFFFF (#4050)
This commit is contained in:
parent
4b8a1353fc
commit
07106f9161
@ -182,7 +182,7 @@ def update_label_color():
|
|||||||
labels = Label.objects.filter(color="")
|
labels = Label.objects.filter(color="")
|
||||||
updated_labels = []
|
updated_labels = []
|
||||||
for label in labels:
|
for label in labels:
|
||||||
label.color = "#" + "%06x" % random.randint(0, 0xFFFFFF)
|
label.color = f"#{random.randint(0, 0xFFFFFF+1):06X}"
|
||||||
updated_labels.append(label)
|
updated_labels.append(label)
|
||||||
|
|
||||||
Label.objects.bulk_update(updated_labels, ["color"], batch_size=100)
|
Label.objects.bulk_update(updated_labels, ["color"], batch_size=100)
|
||||||
|
@ -87,7 +87,7 @@ class BulkCreateIssueLabelsEndpoint(BaseAPIView):
|
|||||||
Label(
|
Label(
|
||||||
name=label.get("name", "Migrated"),
|
name=label.get("name", "Migrated"),
|
||||||
description=label.get("description", "Migrated Issue"),
|
description=label.get("description", "Migrated Issue"),
|
||||||
color="#" + "%06x" % random.randint(0, 0xFFFFFF),
|
color=f"#{random.randint(0, 0xFFFFFF+1):06X}",
|
||||||
project_id=project_id,
|
project_id=project_id,
|
||||||
workspace_id=project.workspace_id,
|
workspace_id=project.workspace_id,
|
||||||
created_by=request.user,
|
created_by=request.user,
|
||||||
|
Loading…
Reference in New Issue
Block a user