[PATCH v6 7/8] templates: Integrate series support

Daniel Axtens dja at axtens.net
Wed Oct 26 23:26:26 AEDT 2016


Daniel Axtens <dja at axtens.net> writes:

Forgot to send to the list, sorry.

> Hi Stephen,
>
>> +    def _set_key(self, key):
>> +        self.series = None
>> +        series_id = None
>> +
>> +        key = key.strip()
>> +        if not key:
>> +            return
>> +
>> +        try:
>> +            series_id = int(key)
>> +        except ValueError:
>> +            pass
>> +        except Exception:
>> +            return
> What would the 'except Exception' catch here?
>
>> +        self.series = SeriesRevision.objects.get(id=series_id)
> Should this be in a try? Is series_id guaranteed to exist/be valid here?
>   
>>     <th>
>> +    <!-- TODO(stephenfin) Make this column sortable -->
> Does this get into the HTML served to clients? If so, can we drop it?
> Someone will complain sooner or later if we don't get around to making
> it sortable! :P
>
> Regards,
> Daniel


More information about the Patchwork mailing list