From e9954212aed3ad870e0aebe99064cfe5dd360bfc Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 11 Jan 2023 09:20:14 -0500 Subject: [PATCH] fix test etc --- .github/workflows/django.yml | 4 ++++ catalog/templates/movie.html | 2 +- journal/models.py | 8 ++------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 9c47a395..b6b6d974 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -35,6 +35,10 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + - run: | + sudo apt-get update + sudo apt-get install --yes --no-install-recommends postgresql-client + PGPASSWORD=admin123 psql template1 -U postgres -h localhost -c 'create extension hstore;' - name: Run Tests run: | new_data_model=1 python manage.py makemigrations contenttypes auth mastodon users common management catalog journal social legacy diff --git a/catalog/templates/movie.html b/catalog/templates/movie.html index 796757fb..8409c21e 100644 --- a/catalog/templates/movie.html +++ b/catalog/templates/movie.html @@ -156,7 +156,7 @@ {% if item.last_editor and item.last_editor.preference.show_last_edit %} -
{% trans '最近编辑者:' %}{{ item.last_editor | default:"" }}
+
{% trans '最近编辑者:' %}{{ item.last_editor | default:"" }}
{% endif %}
diff --git a/journal/models.py b/journal/models.py index aba82420..8757ab01 100644 --- a/journal/models.py +++ b/journal/models.py @@ -120,9 +120,7 @@ class Content(Piece): visibility = models.PositiveSmallIntegerField( default=0 ) # 0: Public / 1: Follower only / 2: Self only - created_time = models.DateTimeField( - default=timezone.now - ) # auto_now_add=True FIXME revert this after migration + created_time = models.DateTimeField(default=timezone.now) edited_time = models.DateTimeField( default=timezone.now ) # auto_now=True FIXME revert this after migration @@ -433,9 +431,7 @@ class ListMember(Piece): visibility = models.PositiveSmallIntegerField( default=0 ) # 0: Public / 1: Follower only / 2: Self only - created_time = models.DateTimeField( - default=timezone.now - ) # auto_now_add=True FIXME revert this after migration + created_time = models.DateTimeField(default=timezone.now) edited_time = models.DateTimeField( default=timezone.now ) # auto_now=True FIXME revert this after migration