Code review comment for lp:~wallyworld/launchpad/unshare-team-members-subscriptions2-1009358

Revision history for this message
Ian Booth (wallyworld) wrote :

>
>> 202 + @property
>> 203 + def information_types(self):
>> 204 + return [
>> 205 + enumerated_type_registry[InformationType.name].items[value]
>> 206 + for value in self.metadata['information_types']]
>>
>> Why does this use the registry? You are looking the enum up by the name you got from the enum :)
>>
>
> I think you misread it :-) It's pulling serialised values (the names)
> from the stored json and looking them up in an items list associated
> with the InformationType.name attribute.
>

My mistake, I had grabbed some de-serialisation code and the registry
lookuo was indeed surperfulous here.

« Back to merge proposal