Skip to content
  • Damien Lespiau's avatar
    models: Don't query a related field in __unicode__ · 6714f34d
    Damien Lespiau authored
    
    
    Turns out that str(object) is used when putting 'object' in the
    template context. Because of revisions __unicode__ was using series.name
    we were doing as many queries as revisions in the detailed series page,
    without actually using that string representation anywhere.
    
    Because the string representation of SeriesRevision is not very useful,
    let's just get rid of that query altogether.
    
    Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
    6714f34d