Use edit date to track is status has been updated
This commit is contained in:
parent
20cca69f06
commit
b11b810ec9
|
@ -35,6 +35,7 @@ class Note(ActivityObject):
|
||||||
tag: List[Link] = field(default_factory=lambda: [])
|
tag: List[Link] = field(default_factory=lambda: [])
|
||||||
attachment: List[Document] = field(default_factory=lambda: [])
|
attachment: List[Document] = field(default_factory=lambda: [])
|
||||||
sensitive: bool = False
|
sensitive: bool = False
|
||||||
|
updated: str = None
|
||||||
type: str = "Note"
|
type: str = "Note"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Generated by Django 3.2.5 on 2021-10-15 00:28
|
# Generated by Django 3.2.5 on 2021-10-15 15:54
|
||||||
|
|
||||||
from django.db import migrations, models
|
import bookwyrm.models.fields
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -12,7 +13,7 @@ class Migration(migrations.Migration):
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name="status",
|
model_name="status",
|
||||||
name="edited",
|
name="edited_date",
|
||||||
field=models.BooleanField(default=False),
|
field=bookwyrm.models.fields.DateTimeField(blank=True, null=True),
|
||||||
),
|
),
|
||||||
]
|
]
|
|
@ -43,7 +43,9 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
||||||
published_date = fields.DateTimeField(
|
published_date = fields.DateTimeField(
|
||||||
default=timezone.now, activitypub_field="published"
|
default=timezone.now, activitypub_field="published"
|
||||||
)
|
)
|
||||||
edited = models.BooleanField(default=False)
|
edited_date = fields.DateTimeField(
|
||||||
|
blank=True, null=True, activitypub_field="updated"
|
||||||
|
)
|
||||||
deleted = models.BooleanField(default=False)
|
deleted = models.BooleanField(default=False)
|
||||||
deleted_date = models.DateTimeField(blank=True, null=True)
|
deleted_date = models.DateTimeField(blank=True, null=True)
|
||||||
favorites = models.ManyToManyField(
|
favorites = models.ManyToManyField(
|
||||||
|
|
Loading…
Reference in New Issue