mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
remove colorhash (this will be done client side)
This commit is contained in:
@@ -8,7 +8,6 @@ from collections import OrderedDict
|
||||
import pathvalidate
|
||||
|
||||
import dateutil.parser
|
||||
from colorhash import ColorHash
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
@@ -93,15 +92,6 @@ class Tag(MatchingModel):
|
||||
verbose_name = _("tag")
|
||||
verbose_name_plural = _("tags")
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if self.colour == "":
|
||||
self.colour = ColorHash(
|
||||
self.name,
|
||||
lightness=(0.35, 0.45, 0.55, 0.65),
|
||||
saturation=(0.2, 0.3, 0.4, 0.5)).hex
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class DocumentType(MatchingModel):
|
||||
|
||||
|
Reference in New Issue
Block a user