'Return the location record from the database'

def getLocationRecord(self, complete_id, location):

    record = Storage()
    if (location != None):
        gtable = current.s3db.gis_location
        query = (gtable.name == location)
        record = current.db(query).select(gtable.name, gtable.lat, gtable.lon)
        record.complete_id = complete_id
        record.key = location
        if (len(record.records) == 0):
            msg = ('Unknown    Location    %s,    %s,    %s' % (location, query, record.key))
            _debug(msg)
        return record
    else:
        return None
