1
0
Fork 0
forked from mia/0x0

PEP8 compliance

This commit is contained in:
Mia Herkt 2024-09-27 17:39:18 +02:00
parent a2147cc964
commit de19212a71
No known key found for this signature in database
18 changed files with 376 additions and 299 deletions

View file

@ -19,6 +19,7 @@ from pathlib import Path
Base = automap_base()
def upgrade():
op.add_column('file', sa.Column('size', sa.BigInteger(), nullable=True))
bind = op.get_bind()
@ -34,8 +35,8 @@ def upgrade():
p = storage / f.sha256
if p.is_file():
updates.append({
"id" : f.id,
"size" : p.stat().st_size
"id": f.id,
"size": p.stat().st_size
})
session.bulk_update_mappings(File, updates)