~elopio/ubuntu-webcatalog/fix-1067798

« back to all changes in this revision

Viewing changes to src/webcatalog/models/applications.py

[r=lukasz-czyzykowski],[bug=1015505] Display correct license (from import) on details page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
    is_latest = models.BooleanField()
103
103
    wilson_score = models.FloatField(null=True, blank=True, db_index=True)
104
104
    debtags = models.CharField(max_length=255, blank=True)
 
105
    license = models.CharField(
 
106
        max_length=64, blank=True,
 
107
        help_text=u"The name of the license used for the app.")
105
108
 
106
109
    # Other desktop fields used by s-c
107
110
    # x-gnome-fullname
174
177
        return crumbs
175
178
 
176
179
    def license_type(self):
177
 
        if self.for_purchase:
178
 
            return "Proprietary"
179
 
        else:
180
 
            return "Open Source"
 
180
        return self.license or "Open Source"
181
181
 
182
182
    @property
183
183
    def architectures_list(self):