mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Merge pull request #3131 from hughrun/user-migration
merge migrations and lint
This commit is contained in:
commit
065e15e4db
2 changed files with 14 additions and 2 deletions
|
@ -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 = []
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue