Ignore:
Timestamp:
May 10, 2010 1:40:40 PM (14 years ago)
Author:
mylan
Message:

Little simplification getter for the field, update path for the link field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.referencedatagridfield/trunk/quintagroup/referencedatagridfield/_field.py

    r2278 r2281  
    131131                "title": row["title"], 
    132132                # View data 
    133                 "url": "", 
    134                 "url_title": row["title"]}) 
     133                "url": ""}) 
    135134            data = result[-1] 
    136135            # Process remote URL and collect UIDs 
     
    138137                data["url"] = quote(row["link"], safe='?$#@/:=+;$,&%') 
    139138                # if title not set for remote url - set it equals to url 
    140                 if not data["url_title"]: 
    141                     data["url_title"] = row["link"] 
     139                if not data["title"]: 
     140                    data["title"] = row["link"] 
    142141            else: 
    143142                uids[row["uid"]] = data 
     
    148147                data = uids[b.UID] 
    149148                data["url"] = b.getURL() 
     149                data["link"] = b.getPath() 
    150150                # If title not set - get it from the brain 
    151                 if not data["url_title"]: 
    152                     data["url_title"] = self._brains_title_or_id(b, instance) 
     151                if not data["title"]: 
     152                    data["title"] = self._brains_title_or_id(b, instance) 
    153153 
    154154        return result 
Note: See TracChangeset for help on using the changeset viewer.