This commit is contained in:
Michał 2023-04-10 23:09:39 +00:00
parent 83435f5372
commit aa655a40a2
3 changed files with 6 additions and 7 deletions

View file

@ -1,3 +1,6 @@
"""
Extensions used by the application
"""
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager

View file

@ -77,8 +77,8 @@ class Metadata:
"raw": value,
"formatted": (
getattr(
helpers,
mapping_val[key][1], # pylint: disable=E0602
helpers, # pylint: disable=E0602
mapping_val[key][1],
)(value)
),
}

View file

@ -78,13 +78,9 @@ def image(image_id):
# Slice the list of IDs into chunks of the limit
for j in total_images[i * limit : (i + 1) * limit]:
# Is our image in this chunk?
if image_id > j[-1]:
continue
else:
if image_id < j[-1]:
return_page = i + 1
break
# Techically we dont need to go further since the image
# Is somewhere on this page
return render_template(
"image.html",