Load extension from real_path instead of db row.
This commit is contained in:
parent
6048f0915d
commit
3795bde5b1
1 changed files with 2 additions and 3 deletions
|
@ -785,8 +785,7 @@ class Photo(ObjectBase):
|
||||||
self.created = db_row['created']
|
self.created = db_row['created']
|
||||||
self.author_id = self.normalize_author_id(db_row['author_id'])
|
self.author_id = self.normalize_author_id(db_row['author_id'])
|
||||||
self.override_filename = db_row['override_filename']
|
self.override_filename = db_row['override_filename']
|
||||||
self.extension = db_row['extension']
|
self.extension = self.real_path.extension.no_dot
|
||||||
self.tagged_at = db_row['tagged_at']
|
|
||||||
|
|
||||||
if self.extension == '':
|
if self.extension == '':
|
||||||
self.dot_extension = ''
|
self.dot_extension = ''
|
||||||
|
@ -801,7 +800,7 @@ class Photo(ObjectBase):
|
||||||
self.ratio = db_row['ratio']
|
self.ratio = db_row['ratio']
|
||||||
|
|
||||||
self.thumbnail = self.normalize_thumbnail(db_row['thumbnail'])
|
self.thumbnail = self.normalize_thumbnail(db_row['thumbnail'])
|
||||||
|
self.tagged_at = db_row['tagged_at']
|
||||||
self.searchhidden = db_row['searchhidden']
|
self.searchhidden = db_row['searchhidden']
|
||||||
|
|
||||||
self.mimetype = helpers.get_mimetype(self.real_path.basename)
|
self.mimetype = helpers.get_mimetype(self.real_path.basename)
|
||||||
|
|
Loading…
Reference in a new issue