merge migrations and lint

This commit is contained in:
Hugh Rundle 2023-11-22 21:29:54 +11:00
parent 0276c15948
commit 72c1c6ee3d
No known key found for this signature in database
GPG key ID: A7E35779918253F9
2 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1,13 @@
# Generated by Django 3.2.23 on 2023-11-22 10:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0186_auto_20231116_0048"),
("bookwyrm", "0188_theme_loads"),
]
operations = []

View file

@ -127,12 +127,11 @@ def id_to_username(user_id):
return value
@register.filter(name="get_file_size")
def get_file_size(file):
"""display the size of a file in human readable terms"""
try:
raw_size = os.stat(file.path).st_size
if raw_size < 1024: