ella/ella — pull request #127 by miso-belica (2012-09-20 11:01:14+00:00)
Title: Fixes for `ella.photos`.

Creating 'Format' object with specified id (not existing) raises "DatabaseError: Forced update did not affect any rows." exception, because force_update is always set to True.

Code raising exception:
```python
from ella.photos.models import Format

f = Format()
f.max_width = 100
f.max_height = 100
f.id = 432
f.save()
```

---------------------

Exception "I/O operation on closed file" is raised for photo image. Related issue: http://stackoverflow.com/questions/3029988/django-gives-i-o-operation-on-closed-file-error-when-reading-from-a-saved-imag

Code raising exception: https://github.com/SanomaCZ/ella-hub/blob/master/tests/test_api/test_photos_resources.py#L107-110
```python
photo = Photo.objects.create(title="photo title", image="path/to/file.jpg")
format = Format.objects.create(name="format_name", max_height=200, max_width=200)
FormatedPhoto.objects.create(photo=photo, format=format)
```