Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/siarnaq/api/compete/serializers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import random
from datetime import timezone

import structlog
from django.conf import settings
Expand Down Expand Up @@ -283,7 +284,7 @@ def _normalize(obj):
from django.utils import timezone as dj_tz

# Parse the datetime string and convert to UTC
created = dj_tz.localtime(instance.created, dj_tz.utc)
created = dj_tz.localtime(instance.created, timezone.utc)
data["created"] = created.isoformat().replace("+00:00", "Z")
# Redact match details depending on client identity
if self.context["user_is_staff"]:
Expand Down
3 changes: 2 additions & 1 deletion backend/siarnaq/gcloud/titan.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import structlog
from django.conf import settings
from google.auth import impersonated_credentials
from PIL import Image

logger = structlog.get_logger(__name__)

Expand Down Expand Up @@ -105,6 +104,8 @@ def get_object(


def upload_image(raw_image, image_path):
from PIL import Image

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is definitely sus, long-term fix is probably update things correctly. will merge to fix ci.


img = Image.open(raw_image)
img.thumbnail(settings.GCLOUD_MAX_AVATAR_SIZE)

Expand Down
2 changes: 2 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ dependencies:
- openjdk=11
- openssl>=3.0.15
- pillow=9.0.1
- libtiff
- pip=22.3
- pre_commit=2.20.0
- psycopg2=2.9.3
- python=3.10
- setuptools<81
- pyupgrade=3.1.0
- terraform=1.3.4
- pip:
Expand Down
Loading