fix test etc

This commit is contained in:
Your Name 2023-01-11 09:20:14 -05:00
parent 89b7c21039
commit e9954212ae
3 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -156,7 +156,7 @@
{% if item.last_editor and item.last_editor.preference.show_last_edit %}
<div>{% trans '最近编辑者:' %}<a href="{% url 'journal:user_profile' 'fixme' %}">{{ item.last_editor | default:"" }}</a></div>
<div>{% trans '最近编辑者:' %}<a href="{% url 'journal:user_profile' item.last_editor.mastodon_username %}">{{ item.last_editor | default:"" }}</a></div>
{% endif %}
<div>

View file

@ -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