mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Allow setting more than one tag in mail rules
The three migrations do the following to preserve existing data in assign_tag: 1. Add the new many-to-many field assign_tags. 2. Copy existing data from the assign_tag field to the assign_tags. 3. Delete the existing assign_tag field.
This commit is contained in:
parent
cc93616019
commit
4022284059
6 changed files with 71 additions and 6 deletions
|
|
@ -169,11 +169,10 @@ class MailRule(models.Model):
|
|||
default=TitleSource.FROM_SUBJECT,
|
||||
)
|
||||
|
||||
assign_tag = models.ForeignKey(
|
||||
assign_tags = models.ManyToManyField(
|
||||
document_models.Tag,
|
||||
null=True,
|
||||
blank=True,
|
||||
on_delete=models.SET_NULL,
|
||||
related_name="mail_rules_multi",
|
||||
verbose_name=_("assign this tag"),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue