Ticket #2428 (closed defect: fixed)

Opened 3 years ago

Last modified 13 months ago

custom images not loading under 0.84

Reported by: walter Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
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

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

Change History

in reply to: ↑ description   Changed 3 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 3 years ago by walter

using {'mime_type': [mime_type]}

  Changed 13 months ago by walter

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