Opened 9 years ago

Closed 7 years ago

#2428 closed defect (fixed)

custom images not loading under 0.84

Reported by: walter Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Visual Match Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

I'll be doing more debugging/.testing as a result of http://lists.sugarlabs.org/archive/sugar-devel/2010-October/027600.html and have a crude work-around in the code right now. The problem is datastore.find({'mime-type': mime_type }) returns nothing in 0.84. (The workaround is that datastore.find({'title': basename}) returns everything, so I can -- inefficiently -- sort through the entire Journal looking for images to upload.

The attached file contains the work-aorund.

Attachments (1)

VisualMatch-27.xo (204.5 KB) - added by walter 9 years ago.
using {'mime_type': [mime_type]}

Download all attachments as: .zip

Change History (3)

comment:1 in reply to: ↑ description Changed 9 years ago by sascha_silbe

Replying to walter:

I'll be doing more debugging/.testing as a result of http://lists.sugarlabs.org/archive/sugar-devel/2010-October/027600.html and have a crude work-around in the code right now. The problem is datastore.find({'mime-type': mime_type }) returns nothing in 0.84. (The workaround is that datastore.find({'title': basename}) returns everything, so I can -- inefficiently -- sort through the entire Journal looking for images to upload.

As explained in that thread, the solution is to use {'mime_type': [mime_type]} . That will work on 0.84+.
You can even pass multiple MIME types and get all entries matching any of the MIME types.

Changed 9 years ago by walter

using {'mime_type': [mime_type]}

comment:2 Changed 7 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.