Changeset 564

Show
Ignore:
Timestamp:
02/16/10 02:19:33 (5 months ago)
Author:
olivier
Message:

fix enriched items query set when the location belongs to several country

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/telemeta/models/query.py

    r561 r564  
    148148                    '(SELECT l2.name FROM location_relations AS r INNER JOIN locations AS l2 ' 
    149149                    'ON r.ancestor_location_id = l2.id ' 
    150                     'WHERE r.location_id = media_items.location_id AND l2.type = ' + str(Location.COUNTRY) + ' ))' 
     150                    'WHERE r.location_id = media_items.location_id AND l2.type = ' + str(Location.COUNTRY) + ' LIMIT 1))' 
    151151                }) 
    152152            else: