Stripe checkout #104411

Merged
Anna Sirota merged 61 commits from stripe into main 2024-06-17 18:08:41 +02:00
Showing only changes of commit 233daafda7 - Show all commits

View File

@ -1,5 +1,6 @@
from typing import Iterable
from datetime import date, timedelta from datetime import date, timedelta
from typing import Iterable
import logging
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from django.db import models from django.db import models
@ -10,6 +11,7 @@ from common.upload_paths import get_upload_to_hashed_path
from films.models import Asset, Film from films.models import Asset, Film
User = get_user_model() User = get_user_model()
logger = logging.getLogger(__name__)
class ProductionLog(mixins.CreatedUpdatedMixin, mixins.StaticThumbnailURLMixin, models.Model): class ProductionLog(mixins.CreatedUpdatedMixin, mixins.StaticThumbnailURLMixin, models.Model):
@ -143,7 +145,7 @@ class ProductionLogEntry(mixins.CreatedUpdatedMixin, models.Model):
contributors = [] contributors = []
for asset in self.assets.all(): for asset in self.assets.all():
if not asset.static_asset: if not asset.static_asset:
return [] continue
for contributor in asset.static_asset.contributors.all(): for contributor in asset.static_asset.contributors.all():
if contributor.pk in contributors_ids: if contributor.pk in contributors_ids:
continue continue