Fix uploading of images (sql: media_data, exif).
When uploading a new image the processing code wants to set the media_data['exif'] part. As exif is not yet in sql, there is no way to make this work now. So the workaround is to check for "no row exists yet" and just ignore exif.
This commit is contained in:
parent
729424befd
commit
497d927983
@ -115,10 +115,13 @@ def process_image(entry):
|
||||
|
||||
# Insert exif data into database
|
||||
media_data = entry.setdefault('media_data', {})
|
||||
media_data['exif'] = {
|
||||
'clean': clean_exif(exif_tags)}
|
||||
media_data['exif']['useful'] = get_useful(
|
||||
media_data['exif']['clean'])
|
||||
|
||||
# TODO: Fix for sql media_data, when exif is in sql
|
||||
if media_data is not None:
|
||||
media_data['exif'] = {
|
||||
'clean': clean_exif(exif_tags)}
|
||||
media_data['exif']['useful'] = get_useful(
|
||||
media_data['exif']['clean'])
|
||||
|
||||
if len(gps_data):
|
||||
for key in list(gps_data.keys()):
|
||||
|
Loading…
x
Reference in New Issue
Block a user