johnmnemonik / django-photologue

Automatically exported from code.google.com/p/django-photologue
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

photosize.name passed instead of photosize #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. python pl-admin.py -s=display create

What is the expected output? What do you see instead?
/usr/lib/python2.5/site-packages/photologue/models.py in create_size(self,
photosize)
    284         if im.size == photosize.size():
    285             shutil.copy(self.get_image_filename(),
--> 286                         self._get_SIZE_path(photosize.name))
    287             return
    288         cur_width, cur_height = im.size

/usr/lib/python2.5/site-packages/photologue/models.py in
_get_SIZE_path(self, photosize)
    248     def _get_SIZE_path(self, photosize):
    249         return os.path.join(self.cache_path(),
--> 250                            
self._get_filename_for_size(photosize.name))
    251
    252     def add_accessor_methods(self, *args, **kwargs):

I think the wrong one is 286, only photosize should be passed as an argument.

What version of the product are you using? On what operating system?
r115 on Ubuntu (Geodjango)

Please provide any additional information below.

Original issue reported on code.google.com by ingenier...@gmail.com on 28 Feb 2008 at 4:30

GoogleCodeExporter commented 8 years ago
Good catch. Currently my test project does not have any photosizes that match 
the
original, so I totally missed this. Fixed in r116. 

Original comment by justin.d...@gmail.com on 28 Feb 2008 at 4:42