Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
derneuere committed Mar 30, 2024
1 parent 602bb1e commit 77d8f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/migrations/0063_apply_default_album_things_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def apply_default(apps, schema_editor):
AlbumThing = apps.get_model("api", "AlbumThing")

for thing in AlbumThing.objects.all():
if not thing.cover_photos and thing.photos.count() > 0:
if thing.photos.count() > 0:
thing.cover_photos.add(*thing.photos.all()[:4])
thing.save()

Expand Down

0 comments on commit 77d8f2a

Please sign in to comment.