mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-23 15:38:08 +00:00
Mark Hashtag.name field as deduplication field
This ensures that when an existing hashtag comes in through ActivityPub federation, it correctly finds the local one, instead of creating duplicate hashtags.
This commit is contained in:
parent
e8a306437f
commit
0fd49d2aea
1 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,11 @@ class Hashtag(ActivitypubMixin, BookWyrmModel):
|
|||
"a hashtag which can be used in statuses"
|
||||
|
||||
name = CICharField(
|
||||
max_length=256, blank=False, null=False, activitypub_field="name"
|
||||
max_length=256,
|
||||
blank=False,
|
||||
null=False,
|
||||
activitypub_field="name",
|
||||
deduplication_field=True,
|
||||
)
|
||||
|
||||
name_field = "name"
|
||||
|
|
Loading…
Reference in a new issue