Merge pull request #1257 from bookwyrm-social/user-active-date

Fixes over-reporting user last active date
This commit is contained in:
Mouse Reeve 2021-08-05 22:26:14 -06:00 committed by GitHub
commit 5f10e7535b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,19 @@
# Generated by Django 3.2.4 on 2021-08-06 02:51
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0080_alter_shelfbook_options"),
]
operations = [
migrations.AlterField(
model_name="user",
name="last_active_date",
field=models.DateTimeField(default=django.utils.timezone.now),
),
]

View file

@ -111,7 +111,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
remote_id = fields.RemoteIdField(null=True, unique=True, activitypub_field="id")
created_date = models.DateTimeField(auto_now_add=True)
updated_date = models.DateTimeField(auto_now=True)
last_active_date = models.DateTimeField(auto_now=True)
last_active_date = models.DateTimeField(default=timezone.now)
manually_approves_followers = fields.BooleanField(default=False)
show_goal = models.BooleanField(default=True)
discoverable = fields.BooleanField(default=False)