hovel / imagestore

Django gallery solution.
BSD 3-Clause "New" or "Revised" License
164 stars 72 forks source link

When deleting first image in album, the whole album is deleted #14

Closed iranana closed 11 years ago

iranana commented 11 years ago

I've modified my album template slightly so that my images thumbnails open into a full view with Yoxview image viewer and I no longer use the image template. I'm also generating my edit and delete buttons for each image underneath the thumbnail on the album page. Whenever I delete the first image in an album the whole album gets deleted, but this problem doesn't occur if the image isn't the first in the album. I'm not sure if this issue exists in Imagestore normally, but I was wondering if anyone has experienced the same issue or know what might be causing it? Can provide more detail if needed :) Thanks!

iranana commented 11 years ago

Latest commit solves this issue, thanks to Zeus!

Reference: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.on_delete